From 3b96a5a73ba9177f355f639bc3e927fcce385ab4 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Fri, 13 Jul 2007 09:48:32 -0400 Subject: [PATCH] diff: Create a diff against the top-most applied patch Signed-off-by: Josef 'Jeff' Sipek --- Documentation/guilt-diff.txt | 31 +++++++++++++++++++++++++++++++ guilt-diff | 23 +++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 Documentation/guilt-diff.txt create mode 100755 guilt-diff diff --git a/Documentation/guilt-diff.txt b/Documentation/guilt-diff.txt new file mode 100644 index 0000000..7fcf6a5 --- /dev/null +++ b/Documentation/guilt-diff.txt @@ -0,0 +1,31 @@ +guilt-diff(1) +============= + +NAME +---- +guilt-diff - Outputs various diffs + +SYNOPSIS +-------- +include::usage-guilt-diff.txt[] + +DESCRIPTION +----------- +Outputs top-most applied diff and any additional changes in the working +directory to stdout. + +OPTIONS +------- +-z:: + Output a interdiff against the top-most applied patch. This should + produce the same diff as "guilt-new -f foo". + +Author +------ +Written by Josef "Jeff" Sipek + +Documentation +------------- +Documentation by Josef "Jeff" Sipek + +include::footer.txt[] diff --git a/guilt-diff b/guilt-diff new file mode 100755 index 0000000..85e5fcb --- /dev/null +++ b/guilt-diff @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Copyright (C) 2007 Josef 'Jeff' Sipek +# + +USAGE="[-z]" +. `dirname $0`/guilt + +while [ $# -ne 0 ]; do + case "$1" in + -z) + working_tree=t ;; + *) + usage ;; + esac + shift +done + +if [ ! -z "$working_tree" ] ; then + git-diff +else + git-diff HEAD^ +fi -- 2.11.4.GIT