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

Re: recent change in git.git/master broke my repos

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 25, 2007, 18:05 UTC
Message-ID
<Pine.LNX.4.64.0710251351330.7345@iabervon.org>
In-Reply-To
<20071025165633.GA24143@coredump.intra.peff.net>
On Thu, 25 Oct 2007, Jeff King wrote:
Show 28 quoted lines
> On Thu, Oct 25, 2007 at 07:32:36AM -0700, Randal L. Schwartz wrote:
> 
> > I have echo "ref: refs/remotes/origin/master" >.git/refs/heads/upstream
> > so that my daily update script can go:
> > 
> >    git-fetch
> >    if [ repo is on master, and is not dirty ];
> >       git-merge upstream
> >    fi
> > 
> > Yesterday that worked.
> > 
> > Today I get a rash of:
> > 
> >   fatal: Couldn't find remote ref refs/remotes/origin/master
> > 
> > from my git-fetch.
> 
> Randal and I discussed this a bit on IRC, and it turns out not to be
> related to the 'upstream' symref. Instead, he had a broken
> branch.master.merge config that pointed to "refs/remotes/origin/master"
> (which you can see from his script above doesn't actually get used).
> 
> So presumably the old git-fetch didn't care that the contents of
> branch.*.master didn't exist (it's just that nothing got marked for
> merging), but the one just merged from the db/fetch-pack topic does.
> 
> Is this behavior change intentional?

It's not exactly intentional; it's just that nobody seems to have tested this particular misconfiguration. It should probably report an error (since the configuration is, in fact, broken and potentially misleading), but it probably shouldn't be fatal and certainly shouldn't be so uninformative.

I guess it's a new feature that you can use a branch.*.merge line to select a ref that otherwise wouldn't be fetched at all, cause it to be fetched, and have it marked for merging; previously, such a config line would just be ignored, as it didn't exactly match anything. It's a side effect that something that doesn't exist (by that name on the remote side) is now an issue.

	-Daniel
*This .sig left intentionally blank*
Previous: Jeff KingNext: Junio C Hamano
Message 16 of 18 in “recent change in git.git/master broke my repos”
  1. Randal L. SchwartzOct 25, 2007
  2. Karl HasselströmOct 25, 2007
  3. Nicolas PitreOct 25, 2007
  4. Randal L. SchwartzOct 25, 2007
  5. Andreas EricssonOct 25, 2007
  6. Nicolas PitreOct 25, 2007
  7. Andreas EricssonOct 25, 2007
  8. Karl HasselströmOct 26, 2007
  9. Jeff KingOct 25, 2007
  10. Randal L. SchwartzOct 25, 2007
  11. Jeff KingOct 25, 2007
  12. Randal L. SchwartzOct 25, 2007
  13. Jeff KingOct 25, 2007
  14. Randal L. SchwartzOct 25, 2007
  15. Jeff KingOct 25, 2007
  16. Daniel BarkalowOct 25, 2007
  17. Junio C HamanoOct 27, 2007
  18. Daniel BarkalowOct 27, 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.