summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 57fe64a)
raw | patch | inline | side by side (parent: 57fe64a)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Fri, 20 May 2005 05:39:27 +0000 (22:39 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Fri, 20 May 2005 05:39:27 +0000 (22:39 -0700) |
Add '-R' flag to diff-tree, and change the test subdirectory
shell files to be executable (something that Junio couldn't
get me to do through the pure patch with my current patch
handling infrastructure).
shell files to be executable (something that Junio couldn't
get me to do through the pure patch with my current patch
handling infrastructure).
diff-tree.c | patch | blob | history | |
t/t0110-environment-names-old.sh | [changed mode: 0644->0755] | patch | blob | history |
t/t1000-read-tree-m-3way.sh | [changed mode: 0644->0755] | patch | blob | history |
t/t2002-checkout-cache-u.sh | [changed mode: 0644->0755] | patch | blob | history |
t/t4000-diff-format.sh | [changed mode: 0644->0755] | patch | blob | history |
t/t4001-diff-rename.sh | [changed mode: 0644->0755] | patch | blob | history |
diff --git a/diff-tree.c b/diff-tree.c
index b43df18ef5e6f20366e8c5f3ae24b8466edebb8b..5559dd3d8f478e96c3786f34eec71aaba111f861 100644 (file)
--- a/diff-tree.c
+++ b/diff-tree.c
static int line_termination = '\n';
static int generate_patch = 0;
static int detect_rename = 0;
+static int reverse_diff = 0;
static int diff_score_opt = 0;
static const char *header = NULL;
static const char *header_prefix = "";
{
int ret;
- diff_setup(detect_rename, diff_score_opt, 0,
+ diff_setup(detect_rename, diff_score_opt, reverse_diff,
(generate_patch ? -1 : line_termination),
0, 0);
ret = diff_tree_sha1(old, new, base);
void *tree;
unsigned long size;
- diff_setup(detect_rename, diff_score_opt, 0,
+ diff_setup(detect_rename, diff_score_opt, reverse_diff,
(generate_patch ? -1 : line_termination),
0, 0);
tree = read_object_with_reference(new, "tree", &size, 0);
}
static char *diff_tree_usage =
-"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-m] [-s] [-v] <tree-ish> <tree-ish>";
+"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-R] [-m] [-s] [-v] <tree-ish> <tree-ish>";
int main(int argc, char **argv)
{
recursive = 1;
continue;
}
+ if (!strcmp(arg, "-R")) {
+ reverse_diff = 1;
+ continue;
+ }
if (!strcmp(arg, "-p")) {
recursive = generate_patch = 1;
continue;
old mode 100644 (file)
new mode 100755 (executable)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
new mode 100755 (executable)
diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh
old mode 100644 (file)
new mode 100755 (executable)
new mode 100755 (executable)
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
old mode 100644 (file)
new mode 100755 (executable)
new mode 100755 (executable)