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.