Add --keep option to keep downloaded packs to git-fetch.
authorTom Prince <tom.prince@ualberta.net>
Wed, 11 Jan 2006 01:50:19 +0000 (18:50 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 11 Jan 2006 06:10:37 +0000 (22:10 -0800)
Signed-off-by: Tom Prince <tom.prince@ualberta.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/fetch-options.txt
git-fetch.sh

index 1fe8423b94739e16f2ad8ec4b07ed45a2e6b964a..e624d3d0ee93c5d1618bf220ecd2d4eafddc47ca 100644 (file)
@@ -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
index 73e57bd784c37b950219819fb2e025da8933aab6..4a0cb32f308742faf0f1ab4d023025ab3602ad31 100755 (executable)
@@ -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