From: Tom Prince Date: Wed, 11 Jan 2006 01:50:19 +0000 (-0700) Subject: Add --keep option to keep downloaded packs to git-fetch. X-Git-Tag: v1.2.0~153 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0f76f52621a6d760127cf2a508e09287766219b6;p=git.git Add --keep option to keep downloaded packs to git-fetch. Signed-off-by: Tom Prince Signed-off-by: Junio C Hamano --- diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 1fe8423b9..e624d3d0e 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -24,6 +24,9 @@ flag lets all tags and their associated objects be downloaded. +-k, \--keep:: + Keep downloaded pack. + -u, \--update-head-ok:: By default `git-fetch` refuses to update the head which corresponds to the current branch. This flag disables the diff --git a/git-fetch.sh b/git-fetch.sh index 73e57bd78..4a0cb32f3 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -40,6 +40,9 @@ do -v|--verbose) verbose=Yes ;; + -k|--k|--ke|--kee|--keep) + keep=--keep + ;; -*) usage ;; @@ -309,7 +312,7 @@ fetch_main () { ( : subshell because we muck with IFS IFS=" $LF" ( - git-fetch-pack "$remote" $rref || echo failed "$remote" + git-fetch-pack $keep "$remote" $rref || echo failed "$remote" ) | while read sha1 remote_name do