mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
pgit.sh: Log complete refspec in get
Change the project header logged during the get command to include the complete refspec. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f86634a1d1
commit
ea968b521b
1 changed files with 4 additions and 2 deletions
|
|
@ -188,8 +188,10 @@ cmd_get()
|
||||||
[ "$from_user" = "$remote_user" ] && remote_name="origin"
|
[ "$from_user" = "$remote_user" ] && remote_name="origin"
|
||||||
[ "$to_ref" = "current-branch" ] && to_ref=$cur_ref
|
[ "$to_ref" = "current-branch" ] && to_ref=$cur_ref
|
||||||
[ "$from_ref" = "current-branch" ] && from_ref=$cur_ref
|
[ "$from_ref" = "current-branch" ] && from_ref=$cur_ref
|
||||||
[ "$refspec_arg" != "$from_user:$from_ref:$to_ref" ] && log "Fetching $from_user:$from_ref:$to_ref ($refspec_arg)"
|
local log_refspec="$from_user:$from_ref"
|
||||||
fat_marker "Getting project $project_name from user $from_user"
|
[ "$to_ref" ] && log_refspec="$log_refspec -> $to_ref"
|
||||||
|
[ "$refspec_arg" -a "$refspec_arg" != "$from_user:$from_ref:$to_ref" ] && log_refspec="$log_refspec ($refspec_arg)"
|
||||||
|
fat_marker "Getting project $project_name from $log_refspec"
|
||||||
if [ -d $project_dir ]; then
|
if [ -d $project_dir ]; then
|
||||||
run_git -C $project_dir remote | grep -q "^$remote_name$" || {
|
run_git -C $project_dir remote | grep -q "^$remote_name$" || {
|
||||||
run_git -C $project_dir remote add $remote_name $pull_url
|
run_git -C $project_dir remote add $remote_name $pull_url
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue