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

Re: pull/push inconsistencies

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
May 16, 2007, 01:51 UTC
Message-ID
<46a038f90705151851i9027e01x993300b1b50d0285@mail.gmail.com>
In-Reply-To
<20070516014002.GA8062@fieldses.org>
On 5/16/07, J. Bruce Fields <bfields@fieldses.org> wrote:
Show 18 quoted lines
> On Tue, May 15, 2007 at 06:22:29PM -0700, Junio C Hamano wrote:
> > "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.
>
> I understand him to be saying that it *doesn't* do that, and that he
> *wants* it to.
I'm probably in a bad-communication day :-/

I have locally .git/refs/remotes/origin/foo, and the remote repo has refs/heads/foo. I don't have .git/refs/heads/foo in this case. When I do git-push, it doesn't really change the remote repo, but it _tells_ me it has.

So - behaviour-wise, it's fine. It's not changing the remote repo. But it tells me it does. It's just plain weird and misleading...

> People think of refs/remotes/origin as a cache of the origin
> repository's branch heads, and they expect it to be updated on write
> (push) as well as read (fetch).
Yes ;-)
cheers,
martin
Previous: J. Bruce FieldsNext: Junio C Hamano
Message 7 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.