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

Re: Update local tracking refs when pushing- no way to disable

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jul 6, 2007, 18:56 UTC
Message-ID
<Pine.LNX.4.64.0707061440050.14638@iabervon.org>
In-Reply-To
<Pine.LNX.4.64.0707061340350.4093@racer.site>
On Fri, 6 Jul 2007, Johannes Schindelin wrote:
Show 11 quoted lines
> Hi,
> 
> Related, but not identical, is the problem illustrated in 
> http://thread.gmane.org/gmane.comp.version-control.git/49888
> 
> IMHO there is a bug. IIUC git push first looks for common ref names on the 
> local and remote side (yes, refs/remotes are excluded since v1.5.3-rc0~9, 
> but the underlying problem is still there). Then it pushes them. But here, 
> something seems to have gone wrong: refs/remotes/origin/HEAD is a symref. 
> And the corresponding ref is updated. Should git-push not just _not_ 
> update symrefs?

I believe this actually have nothing to do with git-push; it's actually git-receive-pack and maybe git-send-pack. Probably git-receive-pack shouldn't list symrefs at all, or should somehow report them as links so that they can be compared as links. The only refs that git-push itself updates are tracking refs on the local side for refs on the remote side which were updated. In the report, the reporter had (obviously) not configured any local tracking refs for the remote's tracking refs.

Now, if there are symref heads on the remote (maybe somebody wants to have a "dominus" branch which is a symref to "master" for people who only speak Latin), and this was in tracking refs as a symref as well, and the user pushed to both (with the remote side somehow identifying that the same change is being made to both names, and that's okay), then the tracking refs would need this same logic as well. But that requires an unimplemented and unrequested feature, with fixes in a number of other places first, before it's even possible to have git-push need to worry about it.

	-Daniel
*This .sig left intentionally blank*
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 8 of 12 in “Update local tracking refs when pushing- no way to disable”
  1. Dan McGeeJul 6, 2007
  2. Johannes SchindelinJul 6, 2007
  3. Junio C HamanoJul 6, 2007
  4. Daniel BarkalowJul 6, 2007
  5. Marco CostalbaJul 6, 2007
  6. Shawn O. PearceJul 6, 2007
  7. Johannes SchindelinJul 6, 2007
  8. Daniel BarkalowJul 6, 2007
  9. Johannes SchindelinJul 6, 2007
  10. Daniel BarkalowJul 6, 2007
  11. Johannes SchindelinJul 6, 2007
  12. Dan McGeeJul 6, 2007

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.