git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/4] git-fetch: Add --recover option

From
Sergey Vlasov <vsu@altlinux.ru>
Date
Sep 14, 2005, 12:47 UTC
Message-ID
<20050914124737.GF24405@master.mivlgu.local>
In-Reply-To
<20050914124206.GC24405@master.mivlgu.local>

Make git-fetch accept the --recover option and pass it to git-http-fetch (for other protocols this option is ignored).

---
 I would add the documentation in the same patch, but noticed that
 other options of git-fetch were not documented, so I made a separate
 patch which documents all of them.
 git-fetch.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
e19be8e89d20745918c76c4b587c286cef88d023
diff --git a/git-fetch.sh b/git-fetch.sh
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -8,6 +8,7 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x4
 append=
 force=
 update_head_ok=
+recover_option=
 while case "$#" in 0) break ;; esac
 do
 	case "$1" in
@@ -22,6 +23,9 @@ do
 	--update-head-o|--update-head-ok)
 		update_head_ok=t
 		;;
+	-r|--r|--re|--rec|--reco|--recov|--recove|--recover)
+		recover_option="--recover"
+		;;
 	*)
 		break
 		;;
@@ -179,7 +183,7 @@ do
 	expr "$head" : "$_x40\$" >/dev/null ||
 		die "Failed to fetch $remote_name from $remote"
 	echo Fetching "$remote_name from $remote" using http
-	git-http-fetch -v -a "$head" "$remote/" || exit
+	git-http-fetch -v -a $recover_option "$head" "$remote/" || exit
 	;;
     rsync://*)
 	TMP_HEAD="$GIT_DIR/TMP_HEAD"
Previous: Sergey VlasovNext: Sergey Vlasov
Message 4 of 15 in “Recovery after interrupted HTTP(s) fetch”
  1. 0/4 Recovery after interrupted HTTP(s) fetchSergey Vlasov, Sep 14, 2005
  2. 1/4 Do not try to process objects more than once during fetchSergey Vlasov, Sep 14, 2005
  3. 2/4 git-*-fetch: Gracefully recover from retrieval failureSergey Vlasov, Sep 14, 2005
  4. 3/4 git-fetch: Add --recover optionSergey Vlasov, Sep 14, 2005
  5. 4/4 Document git-fetch optionsSergey Vlasov, Sep 14, 2005
  6. Junio C HamanoSep 14, 2005
  7. Linus TorvaldsSep 14, 2005
  8. Junio C HamanoSep 14, 2005
  9. Daniel BarkalowSep 14, 2005
  10. Linus TorvaldsSep 14, 2005
  11. Daniel BarkalowSep 14, 2005
  12. Junio C HamanoSep 14, 2005
  13. Matthias UrlichsSep 15, 2005
  14. Daniel BarkalowSep 15, 2005
  15. Junio C HamanoSep 15, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.