public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Bash <bash@genarts•com>
To: Git Mailing List <git@vger•kernel.org>
Subject: Binary file-friendly merge -Xours or -Xtheirs?
Date: Fri, 7 Sep 2012 10:48:48 -0400 (EDT)	[thread overview]
Message-ID: <1265473388.275309.1347029328407.JavaMail.root@genarts.com> (raw)
In-Reply-To: <1799969825.275125.1347028392272.JavaMail.root@genarts.com>

Hi all-

Helping a coworker resolve merge conflicts today I found I wanted a -Xtheirs that completely replaces conflicted binary files with the copy from the incoming branch.  In other words rather than doing

  $ git merge maint
  ... conflicts occur ...
  $ git checkout --theirs -- path/to/binary-file
  $ git add path/to/binary-file
  $ git commit

I'd like to do

  $ git merge -Xbinary_theirs maint
  ... binary conflicts are resolved automatically ...

>From reading the docs it's obvious the current -Xours and -Xtheirs expect to work on hunks, so I (mostly) understand the current behavior, but as a user it feels like "I'm telling you how to resolve conflicts, please do the same thing for binary files".

I am missing a solution that already exists?  Or is this perhaps an improvement that could be made?

Thanks,
Stephen

       reply	other threads:[~2012-09-07 14:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1799969825.275125.1347028392272.JavaMail.root@genarts.com>
2012-09-07 14:48 ` Stephen Bash [this message]
2012-09-07 21:47   ` Binary file-friendly merge -Xours or -Xtheirs? Junio C Hamano
2012-09-09  4:40     ` [PATCH 0/2] Teaching -Xours/-Xtheirs to binary ll-merge driver Junio C Hamano
2012-09-09  4:40       ` [PATCH 1/2] merge: teach " Junio C Hamano
2012-09-09  4:40       ` [PATCH 2/2] attr: "binary" attribute should choose built-in "binary" merge driver Junio C Hamano
2012-09-10 14:03         ` Jeff King
2012-09-12  8:55           ` Junio C Hamano
2012-09-12 12:58             ` Stephen Bash
2012-09-12 17:01               ` Junio C Hamano
2012-09-12 17:50                 ` Stephen Bash
2012-09-12 13:17             ` Jeff King
2012-09-09 14:30       ` [PATCH 0/2] Teaching -Xours/-Xtheirs to binary ll-merge driver Stephen Bash

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265473388.275309.1347029328407.JavaMail.root@genarts.com \
    --to=bash@genarts$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox