diff options
author | Junio C Hamano <junkio@cox.net> | 2006-11-07 15:39:56 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-11-07 15:39:56 -0800 |
commit | 66f3b35fde42b9a235d8fd1c4d4a80f94bfd6a41 (patch) | |
tree | 22a97be6b9d0a9c456b8298bb1bf1e25fa882511 /git-fetch.sh | |
parent | Merge branch 'maint' (diff) | |
parent | remove .keep pack lock files when done with refs update (diff) | |
download | tgif-66f3b35fde42b9a235d8fd1c4d4a80f94bfd6a41.tar.xz |
Merge branch 'np/index-pack'
* np/index-pack:
remove .keep pack lock files when done with refs update
have index-pack create .keep file more carefully
improve fetch-pack's handling of kept packs
git-fetch can use both --thin and --keep with fetch-pack now
Teach receive-pack how to keep pack files based on object count.
Allow pack header preprocessing before unpack-objects/index-pack.
Remove unused variable in receive-pack.
Revert "send-pack --keep: do not explode into loose objects on the receiving end."
missing small substitution
Teach git-index-pack how to keep a pack file.
Only repack active packs by skipping over kept packs.
Allow short pack names to git-pack-objects --unpacked=.
send-pack --keep: do not explode into loose objects on the receiving end.
index-pack: minor fixes to comment and function name
enhance clone and fetch -k experience
mimic unpack-objects when --stdin is used with index-pack
add progress status to index-pack
make index-pack able to complete thin packs.
enable index-pack streaming capability
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-x | git-fetch.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/git-fetch.sh b/git-fetch.sh index 539dff6ee0..7442dd2ca5 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -20,7 +20,7 @@ verbose= update_head_ok= exec= upload_pack= -keep=--thin +keep= while case "$#" in 0) break ;; esac do case "$1" in @@ -51,7 +51,7 @@ do verbose=Yes ;; -k|--k|--ke|--kee|--keep) - keep=--keep + keep='-k -k' ;; --reflog-action=*) rloga=`expr "z$1" : 'z-[^=]*=\(.*\)'` @@ -368,9 +368,10 @@ fetch_main () { ;; # we are already done. *) ( : subshell because we muck with IFS + pack_lockfile= IFS=" $LF" ( - git-fetch-pack $exec $keep "$remote" $rref || echo failed "$remote" + git-fetch-pack --thin $exec $keep "$remote" $rref || echo failed "$remote" ) | while read sha1 remote_name do @@ -378,6 +379,12 @@ fetch_main () { failed) echo >&2 "Fetch failure: $remote" exit 1 ;; + # special line coming from index-pack with the pack name + pack) + continue ;; + keep) + pack_lockfile="$GIT_OBJECT_DIRECTORY/pack/pack-$remote_name.keep" + continue ;; esac found= single_force= @@ -408,6 +415,7 @@ fetch_main () { append_fetch_head "$sha1" "$remote" \ "$remote_name" "$remote_nick" "$local_name" "$not_for_merge" done + if [ "$pack_lockfile" ]; then rm -f "$pack_lockfile"; fi ) || exit ;; esac |