From: Tanguy Ortolo <tanguy+debian@ortolo.eu>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, David Aguilar <davvid@gmail.com>,
Sebastian Schuberth <sschuberth@gmail.com>,
Charles Bailey <charles@hashpling.org>
Subject: Re: git-mergetool: wrap tools with 3 files only to use the BASE file instead of MERGED
Date: Wed, 10 Aug 2011 19:24:59 +0200 [thread overview]
Message-ID: <20110810172458.GA18167@ortolo.eu> (raw)
In-Reply-To: <20110810161211.GC4076@elie.gateway.2wire.net>
[-- Attachment #1.1: Type: text/plain, Size: 133 bytes --]
Jonathan Nieder, 2011-08-10 11:12 UTC-0500:
> I think you forgot to include the example.
Yes, sorry. Here it is.
--
Tanguy Ortolo
[-- Attachment #1.2: meld-mergetool --]
[-- Type: text/plain, Size: 385 bytes --]
#! /bin/sh
BASE="$1"
LOCAL="$2"
REMOTE="$3"
MERGED="$4"
MTIME_BEFORE="$(stat --format='%Y' "$BASE")"
meld "$LOCAL" "$BASE" "$REMOTE"
MTIME_AFTER="$(stat --format="%Y" "$BASE")"
if [ "$MTIME_BEFORE" != "$MTIME_AFTER" ]
then
# The base file was modified, which means the user saved it
cp "$BASE" "$MERGED"
else
# The user did not save the file: merge failed
exit 1
fi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-08-10 17:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110810160356.GA32126@ortolo.eu>
2011-08-10 16:12 ` git-mergetool: wrap tools with 3 files only to use the BASE file instead of MERGED Jonathan Nieder
2011-08-10 17:24 ` Tanguy Ortolo [this message]
2011-08-10 19:23 ` Sebastian Schuberth
2011-08-11 8:38 ` David Aguilar
2011-08-11 8:49 ` Jonathan Nieder
2011-08-11 9:37 ` David Aguilar
2011-08-11 9:48 ` Sebastian Schuberth
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=20110810172458.GA18167@ortolo.eu \
--to=tanguy+debian@ortolo.eu \
--cc=charles@hashpling.org \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=sschuberth@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).