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

Re: pull/push inconsistencies

From
Junio C Hamano <junkio@cox.net>
Date
May 16, 2007, 01:22 UTC
Message-ID
<7v646th8a2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<46a038f90705151811o2159aa5ai84a13e77e790e376@mail.gmail.com>
"Martin Langhoff" <martin.langhoff@gmail.com> writes:
> There are 2 things that I see as wrong...
> - local .git/refs/remote/origin/foo and refs/heads/foo match - why is
> git-push talking about updating them?
Ooo...

Do you mean if you have refs/remotes/origin/foo locally, and push into a repository that has refs/heads/foo (but not refs/remotes/origin/foo), the push results in refs/heads/foo getting updated? If that is what is happening (without any refspecs to instruct git-push to do so) that sounds quite buggy. I need to look into the code for this one.

And I think earlier one I was confused that I thought you were talking about pushing into refs/heads/branch (where branch is checked out). Sorry.

Show 5 quoted lines
> - matching refs should ignore .git/refs/remote
>
> ... the 'matching refs' thing will
> ignore the local .git/refs/remotes directory. AFAICS it's the only
> sane thing to do.

I think you are probably right in that matching only heads and perhaps tags is a sane thing to do (even tags/ is debatable, as they are supposed to be immutable by convention). As a matter of fact I do not recall which part of refs/ namespace it looks at, but it is a very old part of the system and I would not be surprised if it silently assumed that there are only heads and tags there (and not explicitly matching heads and tags only).

Previous: Martin LanghoffNext: J. Bruce Fields
Message 5 of 11 in “pull/push inconsistencies”
  1. Martin LanghoffMay 15, 2007
  2. Jakub NarebskiMay 15, 2007
  3. Junio C HamanoMay 16, 2007
  4. Martin LanghoffMay 16, 2007
  5. Junio C HamanoMay 16, 2007
  6. J. Bruce FieldsMay 16, 2007
  7. Martin LanghoffMay 16, 2007
  8. Junio C HamanoMay 16, 2007
  9. Martin LanghoffMay 16, 2007
  10. Jeff KingMay 16, 2007
  11. Re: pull/push inconsistenciesDaniel Barkalow, May 16, 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.