Hook up the -o flag from Hannes Achleitner (changeset 25364cc).
This adds handling for GIT_DIFF_IMAGE_OUTPUT_DIR as an environment variable, and creates a filename for each comparison to pass through the -o flag.
This commit is contained in:
@ -63,5 +63,19 @@ then
|
||||
e_flag='-e'
|
||||
fi
|
||||
|
||||
o_flag=''
|
||||
if [ -n "${GIT_DIFF_IMAGE_OUTPUT_DIR-}" ]
|
||||
then
|
||||
mkdir -p "$GIT_DIFF_IMAGE_OUTPUT_DIR"
|
||||
destfile=''
|
||||
if [ "$name1" -ne '/dev/null' ]
|
||||
then
|
||||
destfile=$(basename "$name1")
|
||||
else
|
||||
destfile=$(basename "$name2")
|
||||
fi
|
||||
o_flag="-o $GIT_DIFF_IMAGE_OUTPUT_DIR/$destfile"
|
||||
fi
|
||||
|
||||
exec "$thisdir/diff-image" $e_flag -n "$name1" -N "$name2" "$f1" "$f2"
|
||||
|
||||
exec "$thisdir/diff-image" $e_flag $o_flag -n "$name1" -N "$name2" "$f1" "$f2"
|
||||
|
||||
Reference in New Issue
Block a user