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

[PATCH-fix] fetch/pull: short-hand notation for remote repositories.

From
Junio C Hamano <junkio@cox.net>
Date
Jul 16, 2005, 16:47 UTC
Message-ID
<7vek9yn1f5.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<7virzbnruf.fsf_-_@assigned-by-dhcp.cox.net>

The logic to decide when to store fetched head/tag under $GIT_DIR/refs/, and http transport were broken in the previous round.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
*** I see you have already merged my broken one; sorry.

*** Anything written under the influence should be tested as twice *** as hard than usual before being sent --- Don't drink and *** develop ;-). *Blush*

cd /opt/packrat/playpen/public/in-place/git/git.junio/ jit-diff 8:10 # - 4: Documentation: describe short-hand used in fetch/pull. # + 6: git-fetch-script: fix thinko in http fetch.

diff --git a/git-fetch-script b/git-fetch-script
--- a/git-fetch-script
+++ b/git-fetch-script
@@ -12,7 +12,7 @@ case "$merge_repo" in
 http://*)
 	head=$(wget -q -O - "$merge_repo/$merge_head") || exit 1
 	echo Fetching "$merge_head" using http
-	git-http-pull -v -a "$merge_head" "$merge_repo/"
+	git-http-pull -v -a "$head" "$merge_repo/"
 	;;
 rsync://*)
 	rsync -L "$merge_repo/$merge_head" "$TMP_HEAD" || exit 1
@@ -27,10 +27,10 @@ esac || exit 1
 
 git-rev-parse --verify "$head" > /dev/null || exit 1
 
-case "$merge_store" in
-'')
+if test "$merge_store"
+then
 	echo "$head" > "$GIT_DIR/$merge_store"
-esac &&
+fi &&
 
 # FETCH_HEAD is fed to git-resolve-script which will eventually be
 # passed to git-commit-tree as one of the parents.  Make sure we do

Compilation finished at Sat Jul 16 09:37:07
Previous: Junio C HamanoNext: Linus Torvalds
Message 8 of 14 in “Documentation: packed GIT support commands.”
  1. Documentation: packed GIT support commands.Junio C Hamano, Jul 14, 2005
  2. Documentation: update tutorial to talk about push.Junio C Hamano, Jul 15, 2005
  3. Documentation: pull, push, packing repository and working with others.Junio C Hamano, Jul 15, 2005
  4. fetch/pull: support Cogito-style remote branch information.Junio C Hamano, Jul 15, 2005
  5. Linus TorvaldsJul 15, 2005
  6. Junio C HamanoJul 15, 2005
  7. fetch/pull: short-hand notation for remote repositories.Junio C Hamano, Jul 16, 2005
  8. fetch/pull: short-hand notation for remote repositories.Junio C Hamano, Jul 16, 2005
  9. Linus TorvaldsJul 16, 2005
  10. Junio C HamanoJul 16, 2005
  11. git-clone-script: store where we cloned from in .git/branches/originJunio C Hamano, Jul 18, 2005
  12. tutorial: mention "git clone" records .git/branches/originJunio C Hamano, Jul 18, 2005
  13. Documentation: describe short-hand used in fetch/pull.Junio C Hamano, Jul 16, 2005
  14. Documentation: adjust cvsimport command line.Junio C Hamano, Jul 16, 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.