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

Re* BUG: merge -s theirs is not in effect (does the same as -s ours)

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 25, 2017, 05:33 UTC
Message-ID
<xmqqmv5je412.fsf_-_@gitster.mtv.corp.google.com>
In-Reply-To
<20170925031751.lg7zk6krt65dxwas@hopa.kiewit.dartmouth.edu>
Yaroslav Halchenko <yoh@onerussian.com> writes:
> d'oh, indeed there is no git-merge-theirs  neither in debian pkg or a freshly
> built git  and I found a rogue script in the PATH (which did nothing
> apparently, sorry!). BUT I was originally mislead by the --help/manpage:

Ahh, you're right. The text does make readers expect "-s theirs" to exist.

-- >8 --
Subject: merge-strategies: avoid implying that "-s theirs" exists

The description of `-Xours` merge option has a parenthetical note that tells the readers that it is very different from `-s ours`, which is correct, but the description of `-Xtheirs` that follows it carelessly says "this is the opposite of `ours`", giving a false impression that the readers also need to be warned that it is very different from `-s theirs`, which in reality does not even exist.

Clarify it a bit to avoid misleading readers.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * I hope this should help things a bit.
   It is a different matter to resurrect the age old discussion that
   happend in the summer of 2008 if '-s theirs' should or should not
   exist.  In short, the previous discussion can be summarised to
   "we don't want '-s theirs' as it encourages the wrong workflow".
   https://public-inbox.org/git/alpine.DEB.1.00.0807290123300.2725@eeepc-johanness/
   https://public-inbox.org/git/7vtzen7bul.fsf@gitster.siamese.dyndns.org/
   https://public-inbox.org/git/20080720192130.6117@nanako3.lavabit.com/
   It is OK for people to come with new perspective and bring new
   ideas to the table.  We learned from experience while using Git
   for longer and are wiser than what we were back then, and might
   be able to make a better decision ;-)
 Documentation/merge-strategies.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
index 2eb92b9327..a09d597463 100644
--- a/Documentation/merge-strategies.txt
+++ b/Documentation/merge-strategies.txt
@@ -39,7 +39,8 @@ even look at what the other tree contains at all.  It discards everything
 the other tree did, declaring 'our' history contains all that happened in it.
 
 theirs;;
-	This is the opposite of 'ours'.
+	This is the opposite of 'ours'; note that, unlike 'ours', there is
+	no 'theirs' merge stragegy to confuse this merge option with.
 
 patience;;
 	With this option, 'merge-recursive' spends a little extra time
Previous: Yaroslav HalchenkoNext: Yaroslav Halchenko
Message 4 of 19 in “BUG: merge -s theirs is not in effect (does the same as -s ours)”
  1. Yaroslav HalchenkoSep 25, 2017
  2. Junio C HamanoSep 25, 2017
  3. Yaroslav HalchenkoSep 25, 2017
  4. Re* BUG: merge -s theirs is not in effect (does the same as -s ours)Junio C Hamano, Sep 25, 2017
  5. -X theirs does not resolve symlink conflict Was: BUG: merge -s theirs is not in effectYaroslav Halchenko, Sep 25, 2017
  6. Junio C HamanoSep 26, 2017
  7. Junio C HamanoSep 26, 2017
  8. Junio C HamanoSep 26, 2017
  9. Yaroslav HalchenkoSep 26, 2017
  10. merge: teach -Xours/-Xtheirs to symbolic link mergeJunio C Hamano, Oct 16, 2017
  11. Elijah NewrenDec 29, 2017
  12. Yaroslav HalchenkoDec 29, 2017
  13. external diff driver is not used for diff --stat?Yaroslav Halchenko, Jan 25, 2018
  14. -s theirs use-case(s) Was: BUG: merge -s theirs is not in effectYaroslav Halchenko, Sep 25, 2017
  15. Junio C HamanoSep 26, 2017
  16. Yaroslav HalchenkoSep 26, 2017
  17. Junio C HamanoSep 27, 2017
  18. Yaroslav HalchenkoSep 27, 2017
  19. Yaroslav HalchenkoSep 27, 2017

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.