summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Tom Prince <tom.prince@ualberta.net>2006-01-10 18:50:19 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-01-10 22:10:37 -0800
commit0f76f52621a6d760127cf2a508e09287766219b6 (patch)
tree7cfe7e06a479489063942b32e2a92f2147635855
parentMerge fixes up to GIT 1.1.1 (diff)
downloadtgif-0f76f52621a6d760127cf2a508e09287766219b6.tar.xz
Add --keep option to keep downloaded packs to git-fetch.
Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Documentation/fetch-options.txt3
-rwxr-xr-xgit-fetch.sh5
2 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 1fe8423b94..e624d3d0ee 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 73e57bd784..4a0cb32f30 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