git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* theirs/ours was Re: [PATCH 6/6] Add a new test for using a custom merge strategy
@ 2008-07-28 14:54 Sverre Rabbelier
  2008-07-28 18:14 ` Miklos Vajna
  2008-07-28 18:56 ` Jeff King
  0 siblings, 2 replies; 28+ messages in thread
From: Sverre Rabbelier @ 2008-07-28 14:54 UTC (permalink / raw)
  To: Git Mailinglist; +Cc: Miklos Vajna, Johannes Schindelin

On Mon, Jul 28, 2008 at 15:12, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Note that what was asked for, and what Junio implemented before deciding
> that it would do more harm than good in git.git, is not the same as what
> you provide.
>
> Your -theirs is a strict opposite of -ours, i.e. the tree after the
> merge will be identical to the "merged" branch's tip's.

I've been wanting to mail about this for a few days now, but didn't
really know how to bring it up, this seems a good opportunity.

It has happened a few times on #git already that someone asked for the
merge strategies described above (e.g., _not_ the insane ones) for
what I deemed to be valid use cases. (The main reason was that they
wanted to merge with a conflicting branch, discarding the current
master, but still allowing people to 'git pull'.)

I was wondering what to tell those people? Will there ever be such a
version of 'merge theirs' (that is the strict opposite of 'ours')? Or
should they do:

$git checkout otherbranch
$git merge -s ours master
$git checkout master
$git merge otherbranch

Thus resulting in a 'wrong way around' merge as part of master? It
would say "Merge branch 'master' into otherbranch", while what
happened was "Merge branch 'otherbranch' into master".

So, in short: what does the list think about adding
"git-merge-theirs", that does (although possibly less 'hackish'):

cat > git-merge-theirs << EOF
#!/bin/sh
eval git read-tree --reset -u \\\$\$#
EOF

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2008-07-29 12:43 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-28 14:54 theirs/ours was Re: [PATCH 6/6] Add a new test for using a custom merge strategy Sverre Rabbelier
2008-07-28 18:14 ` Miklos Vajna
2008-07-28 19:48   ` Sverre Rabbelier
2008-07-28 18:56 ` Jeff King
2008-07-28 19:09   ` Johannes Schindelin
2008-07-28 19:26     ` Jeff King
2008-07-28 20:00       ` Avery Pennarun
2008-07-28 23:27       ` Johannes Schindelin
2008-07-29  0:09         ` Sverre Rabbelier
2008-07-29  4:31           ` Jeff King
2008-07-29  4:38         ` Jeff King
2008-07-29 11:05           ` Johannes Schindelin
2008-07-29 12:36             ` Jeff King
2008-07-29 12:42               ` Sverre Rabbelier
2008-07-29  0:37       ` Junio C Hamano
2008-07-29  5:02         ` Jeff King
2008-07-29  9:36           ` Mike Ralphson
2008-07-29 12:42             ` Jeff King
2008-07-28 19:52     ` Sverre Rabbelier
2008-07-28 20:07     ` Junio C Hamano
2008-07-28 20:10       ` Sverre Rabbelier
2008-07-28 20:20         ` Junio C Hamano
2008-07-28 20:24           ` Sverre Rabbelier
2008-07-28 21:16             ` Junio C Hamano
2008-07-28 21:35               ` Junio C Hamano
2008-07-28 21:39                 ` Sverre Rabbelier
2008-07-29  5:08               ` Jeff King
2008-07-29  6:35                 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).