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

Re: Confusing git pull error message

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 13, 2009, 22:11 UTC
Message-ID
<7veiqamr5e.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090913213609.GA6993@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
>> I think saying "does not exist" will repeat the same mistake of
>> overguessing you are trying to rectify.
>
> You are right, of course. I think your wording makes sense, then
> (otherwise we get stuck with "well, we didn't fetch it. Maybe because it
> didn't exist. Or maybe because your configuration didn't include it.").

Yeah, the saddest part of this whole story is that the message given by the very original was succinct and accurate.

   echo >&2 "Warning: No merge candidate found because value of config option
    \"branch.${curr_branch}.merge\" does not match any remote branch fetched."
   echo >&2 "No changes."

Then we piled up different messages for various cases, and it went downhill from there.

 - First, 8fc293c (Make git-pull complain and give advice when there is
   nothing to merge with, 2007-10-02) made the message say essentially the
   same thing, but with a lot more verbosity, covering only one _common_
   case.
 - Then 441ed41 ("git pull --tags": error out with a better message.,
   2007-12-28) added a special case for --tags.  The description before
   8fc293c would have still been correct without this change.  This was
   necessary because 8fc293c talked only about the "I am on branch and
   there is no configuration" case.
 - Then 61e6108 (git-pull.sh: better warning message for "git pull" on
   detached head., 2009-04-08) added another special case, again because
   the "helpful" instruction given by 8fc293c did not make any sense in
   the detached HEAD case.

It definitely is worth to further cover cases the message by 8fc293c did not consider, as this thread suggested, but at the same time, I think the advice mechanism should be used to bring back a succinct and to-the-point message, close to the original one, e.g.

	Warning: Not merging anything, as no default merge candidate ref
	was fetched from the remote.

so that people who know what they are doing can squelch potentially misleading "helpful" advices and diagnose/think for their own.

Previous: Jeff KingNext: John Tapsell
Message 12 of 28 in “Confusing git pull error message”
  1. John TapsellSep 12, 2009
  2. Jeff KingSep 12, 2009
  3. John TapsellSep 12, 2009
  4. Jeff KingSep 12, 2009
  5. Sverre RabbelierSep 12, 2009
  6. Jeff KingSep 12, 2009
  7. Sverre RabbelierSep 12, 2009
  8. Junio C HamanoSep 13, 2009
  9. Jeff KingSep 13, 2009
  10. Junio C HamanoSep 13, 2009
  11. Jeff KingSep 13, 2009
  12. Junio C HamanoSep 13, 2009
  13. John TapsellSep 13, 2009
  14. Junio C HamanoSep 13, 2009
  15. Junio C HamanoSep 13, 2009
  16. Jeff KingSep 13, 2009
  17. Jeff KingSep 14, 2009
  18. Johannes SixtOct 5, 2009
  19. Jeff KingOct 5, 2009
  20. Johannes SixtOct 5, 2009
  21. Junio C HamanoOct 5, 2009
  22. Jeff KingOct 5, 2009
  23. Jeff KingOct 5, 2009
  24. Nanako ShiraishiOct 8, 2009
  25. Junio C HamanoOct 9, 2009
  26. Junio C HamanoOct 10, 2009
  27. Junio C HamanoOct 5, 2009
  28. Jeff KingOct 5, 2009

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.