John Keeping <> writes:

> You could use a temporary index and do something like:
>       rm -f TMP_INDEX
>       export GIT_INDEX_FILE
>       git read-tree -m $base $ours $theirs &&
>       git merge-index git-merge-one-file -a
> then inspect that with "git diff-index --cached $ours".


> Note that this will fail if there are conflicts and I don't know what
> git-merge-tree will do in that case.

I _think_ Charlies's use case is to detect trivial merges to tell
the requestee that a merge request can be done on site, so failing
is fine when there are conflicts.  merge-tree should report
conflicts as well.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to