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

Re: [PATCH] refuse to merge during a merge

From
Clemens Buchacher <drizzd@aon.at>
Date
May 30, 2009, 08:37 UTC
Message-ID
<20090530083721.GA12963@localhost>
In-Reply-To
<43d8ce650905280912q71c749bn7146210a5838a453@mail.gmail.com>
On Thu, May 28, 2009 at 05:12:40PM +0100, John Tapsell wrote:
Show 7 quoted lines
> > +       if (read_cache_unmerged() || file_exists(git_path("MERGE_HEAD")))
> >                die("You are in the middle of a conflicted merge.");
> 
> Could the error message also give possible solutions?   "Commit the
> current merge first with 'git commit', or discard the current merge
> attempt with 'git reset --hard'" or something.  Or at least a pointer
> to where to read for more info.
How about this.

fatal: You are in the middle of a [conflicted] merge. To complete the merge [resolve conflicts and] commit the changes. To abort, use "git reset HEAD".

The part about resolving changes is only displayed if there are unmerged entries. I intentionally left out --hard, because it potentially removes changes unrelated to the merge (if the work tree was dirty prior to the merge). The user will find out how to reset the work tree by reading the docs.

Clemens
Previous: John TapsellNext: Jakub Narebski
Message 4 of 11 in “refuse to merge during a merge”
  1. refuse to merge during a mergeClemens Buchacher, May 27, 2009
  2. Constantine PlotnikovMay 28, 2009
  3. John TapsellMay 28, 2009
  4. Clemens BuchacherMay 30, 2009
  5. Jakub NarebskiMay 30, 2009
  6. Thomas RastMay 30, 2009
  7. refuse to merge during a mergeClemens Buchacher, May 31, 2009
  8. John TapsellMay 31, 2009
  9. Clemens BuchacherMay 31, 2009
  10. Junio C HamanoMay 31, 2009
  11. refuse to merge during a mergeClemens Buchacher, Jun 1, 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.