Jonathan Nieder, 2011-08-10 11:14 UTC-0500: > Thanks for a clear report. Let's take this upstream.
Perfect. It appears that I have forgotten to attach my example, so here it is. -- Tanguy Ortolo
#! /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
signature.asc
Description: Digital signature

