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

Re: [PATCH] git-merge -s theirs

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 20, 2008, 21:22 UTC
Message-ID
<7vhcak45ez.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080720192130.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
Show 10 quoted lines
> This patch steals much code from "git-merge-resolve" to add "theirs"
> strategy.  Its purpose is to always fail and suggest using the preferred
> command "git reset --hard the-other-commit".
> ...
> +echo "If you wanted to say the other history is better than your history," 
> +echo "use 'git reset --hard $remotes' instead." 
> +echo "If you want to keep a record of your failure, you can create a" 
> +echo "new branch from the current HEAD before running the reset command." 
> +
> +exit 2
That is certainly cute, but I do not like it for two reasons:
 - This advertizes "theirs" as available when you ask "git merge -s whoa",
   and then the user is told "don't use this stupid, go away".  That is
   not exactly a good diplomacy to earn friends.
 - The message gives a rather long hexdecimal string in its suggestion to
   run "git reset --hard".  This is not exactly your fault, though. The
   original refname the user gave to "git-merge" is not available to your
   strategy.
Previous: Nanako ShiraishiNext: Junio C Hamano
Message 2 of 3 in “git-merge -s theirs”
  1. git-merge -s theirsNanako Shiraishi, Jul 20, 2008
  2. Junio C HamanoJul 20, 2008
  3. Re* [PATCH] git-merge -s theirsJunio C Hamano, Jul 28, 2008

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.