Skip to content

Commit

Permalink
Add --keep option to keep downloaded packs to git-fetch.
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Prince <tom.prince@ualberta.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Tom Prince authored and Junio C Hamano committed Jan 11, 2006
1 parent cfa6d70 commit 0f76f52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Documentation/fetch-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion git-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ do
-v|--verbose)
verbose=Yes
;;
-k|--k|--ke|--kee|--keep)
keep=--keep
;;
-*)
usage
;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0f76f52

Please sign in to comment.