Skip to content

scripts : fix repos cloned with .git extension#18669

Merged
CISC merged 1 commit intomasterfrom
cisc/fix-pr2wt-dot-git
Jan 7, 2026
Merged

scripts : fix repos cloned with .git extension#18669
CISC merged 1 commit intomasterfrom
cisc/fix-pr2wt-dot-git

Conversation

@CISC
Copy link
Copy Markdown
Member

@CISC CISC commented Jan 7, 2026

@CISC CISC requested a review from ggerganov January 7, 2026 14:58
@elfarolab
Copy link
Copy Markdown

@CISC

it also doesn't work:

echo $url_origin
https://github.com/ggml-org/llama.cpp.git
org_repo=${org_repo%.git}
echo $org_repo
ggml-org/llama

it is because it matches the . in llama.cpp

@elfarolab
Copy link
Copy Markdown

elfarolab commented Jan 7, 2026

Maybe:

org_repo=$(echo $url_origin | cut -d/ -f4- | sed 's/\.git$//')

@CISC
Copy link
Copy Markdown
Member Author

CISC commented Jan 7, 2026

@CISC

it also doesn't work:
[...]
it is because it matches the . in llama.cpp

Uh, what shell are you using, it works here with bash. ${foo%bar} only removes the last bar (if any), nothing else.

@elfarolab
Copy link
Copy Markdown

@CISC
it also doesn't work:
[...]
it is because it matches the . in llama.cpp

Uh, what shell are you using, it works here with bash. ${foo%bar} only removes the last bar (if any), nothing else.

bash --version
GNU bash, version 5.1.16(1)-release (aarch64-unknown-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@CISC
Copy link
Copy Markdown
Member Author

CISC commented Jan 7, 2026

@CISC
it also doesn't work:
[...]
it is because it matches the . in llama.cpp

Uh, what shell are you using, it works here with bash. ${foo%bar} only removes the last bar (if any), nothing else.

bash --version GNU bash, version 5.1.16(1)-release (aarch64-unknown-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

Don't know what to tell you then, it works, did you actually test the updated script?

@elfarolab
Copy link
Copy Markdown

@CISC

sorry my bad, you are right. I was running:

org_repo=${org_repo%.git}

instead of:

org_repo=${url_origin%.git}

sorry for the noise..

@elfarolab
Copy link
Copy Markdown

elfarolab commented Jan 7, 2026

@CISC

running the modified script I see this:

./scripts/pr2wt.sh 18641
org/repo: ggml-org/llama.cpp
url:      https://github.com/tdakhran/llama.cpp.git
head_ref: tarek/feat/os-lfm2.5-audio-1.5b-upstream
error: No such remote: 'pr/18641'
From https://github.com/tdakhran/llama.cpp
 * branch            tarek/feat/os-lfm2.5-audio-1.5b-upstream -> FETCH_HEAD
 * [new branch]      tarek/feat/os-lfm2.5-audio-1.5b-upstream -> pr/18641/tarek/feat/os-lfm2.5-audio-1.5b-upstream
Preparing worktree (new branch 'pr/18641')
Branch 'pr/18641' set up to track remote branch 'tarek/feat/os-lfm2.5-audio-1.5b-upstream' from 'pr/18641'.
HEAD is now at 4a2f68a Move save_wav implementation to mtmd [no ci]
git worktree created in /opt/usbhd/SRC/llama.cpp-pr-18641

from above:

error: No such remote: 'pr/18641'

git branch -a

* master
  pr-branch_18641
+ pr/18641
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/pr/18641/tarek/feat/os-lfm2.5-audio-1.5b-upstream

the pr-branch_18641 was created by me before..

@ggerganov
Copy link
Copy Markdown
Member

This is expected - the git remote rm command is printing this. Will fix it in a next PR

@github-actions github-actions bot added the script Script related label Jan 7, 2026
@CISC CISC merged commit 5b8844a into master Jan 7, 2026
2 checks passed
@CISC CISC deleted the cisc/fix-pr2wt-dot-git branch January 7, 2026 21:35
gary149 pushed a commit to gary149/llama-agent that referenced this pull request Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

script Script related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants