Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-05-14 00:23:48 +0400
committerJunio C Hamano <junkio@cox.net>2006-05-15 03:26:27 +0400
commitee1e5412a702674d4da95a4aef73a73d2834dcc3 (patch)
tree37b17f11a316e40697f92be515fba733017f84b2 /diff.h
parent975bf9cf5ad5d440f98f464ae8124609a4835ce1 (diff)
git diff: support "-U" and "--unified" options properly
We used to parse "-U" and "--unified" as part of the GIT_DIFF_OPTS environment variable, but strangely enough we would _not_ parse them as part of the normal diff command line (where we only accepted "-u"). This adds parsing of -U and --unified, both with an optional numeric argument. So now you can just say git diff --unified=5 to get a unified diff with a five-line context, instead of having to do something silly like GIT_DIFF_OPTS="--unified=5" git diff -u (that silly format does continue to still work, of course). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index d052608404..bef586d850 100644
--- a/diff.h
+++ b/diff.h
@@ -32,6 +32,7 @@ struct diff_options {
full_index:1,
silent_on_remove:1,
find_copies_harder:1;
+ int context;
int break_opt;
int detect_rename;
int line_termination;