On Mon, 2008-06-23 at 11:49 +0200, Ingo Molnar wrote:This is what I run with. I added the cp to the 3-way merge tools because I think its stupid to see the messed up merge markers instead of the original file. The rej target basically takes the local version and takes the diff between base and remote and applies that as a patch, upon failure it invokes rej to fix up the mess. --- /usr/bin/git-mergetool 2008-04-08 19:01:37.000000000 +0200 +++ git-mergetool 2008-06-02 19:00:55.000000000 +0200 @@ -214,12 +214,14 @@ merge_file () { ;; meld|vimdiff) touch "$BACKUP" + cp -- "$BASE" "$path" "$merge_tool_path" -- "$LOCAL" "$path" "$REMOTE" check_unchanged save_backup ;; gvimdiff) touch "$BACKUP" + cp -- "$BASE" "$path" "$merge_tool_path" -f -- "$LOCAL" "$path" "$REMOTE" check_unchanged save_backup @@ -271,6 +273,13 @@ merge_file () { status=$? save_backup ;; + rej) + touch "$BACKUP" + cp -- "$LOCAL" "$path" + diff -up "$BASE" "$REMOTE" | patch "$path" || rej "$path" + check_unchanged + save_backup + ;; esac if test "$status" -ne 0; then echo "merge of $path failed" 1>&2 @@ -311,7 +320,7 @@ done valid_tool() { case "$1" in - kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge) + kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | rej) ;; # happy *) return 1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Mike Travis | [RFC 00/15] x86_64: Optimize percpu accesses |
| Dave Jones | agp / cpufreq. |
| Willy Tarreau | Re: [PATCH] tcp: splice as many packets as possible at once |
| Gerrit Renker | [PATCH 14/37] dccp: Tidy up setsockopt calls |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
git: | |
