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

Re: How to not download objects more than needed?

From
Jan Harkes <jaharkes@cs.cmu.edu>
Date
Feb 22, 2006, 01:13 UTC
Message-ID
<20060222011338.GL5000@delft.aura.cs.cmu.edu>
In-Reply-To
<Pine.LNX.4.64.0602211635450.30245@g5.osdl.org>
On Tue, Feb 21, 2006 at 04:42:34PM -0800, Linus Torvalds wrote:
Show 8 quoted lines
> 
> 	git pull git://git.kernel.org/....
> 
> and the automatic tag following kicks in, it will first have fetched the 
> objects once, and then when it tries to fetch the tag objects, it will 
> fetch the objects it already fetched _again_ (plus the tags), because it 
> will do the same object pull, but the temporary branch (to be merged) will 
> never have been written as a branch head.
Isn't this easily avoided by fetching the tags first?
Jan
diff --git a/git-fetch.sh b/git-fetch.sh
index b4325d9..9c6748f 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -363,8 +363,6 @@ fetch_main () {
 
 }
 
-fetch_main "$reflist"
-
 # automated tag following
 case "$no_tags$tags" in
 '')
@@ -389,6 +387,8 @@ case "$no_tags$tags" in
 	esac
 esac
 
+fetch_main "$reflist"
+
 # If the original head was empty (i.e. no "master" yet), or
 # if we were told not to worry, we do not have to check.
 case ",$update_head_ok,$orig_head," in
Previous: Linus TorvaldsNext: Junio C Hamano
Message 4 of 10 in “How to not download objects more than needed?”
  1. Radoslaw SzkodzinskiFeb 21, 2006
  2. seanFeb 21, 2006
  3. Linus TorvaldsFeb 22, 2006
  4. Jan HarkesFeb 22, 2006
  5. Junio C HamanoFeb 22, 2006
  6. Jan HarkesFeb 22, 2006
  7. Junio C HamanoFeb 22, 2006
  8. git-fetch: follow tag only when tracking remote branch.Junio C Hamano, Feb 22, 2006
  9. Andreas EricssonFeb 22, 2006
  10. Junio C HamanoFeb 21, 2006

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.