From ee1e5412a702674d4da95a4aef73a73d2834dcc3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 13 May 2006 13:23:48 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- diff.h | 1 + 1 file changed, 1 insertion(+) (limited to 'diff.h') 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; -- cgit v1.2.3