@matheusbsbs / matheus-bagliano / commits / 6932c78cb4
Fork 0

diff-tree: do not default to -c

Marco says it breaks qgit. This makes the flags a bit more orthogonal. $ git-diff-tree -r --abbrev ca18 No output from this command because you asked to skip merge by not having -m there. $ git-diff-tree -r -m --abbrev ca18 ca182053c7710a286d72102f4576cf32e0dafcfb :100644 100644 538d21d... 59042d1... M Makefile :100644 100644 410b758... 6c47c3a... M entry.c ca182053c7710a286d72102f4576cf32e0dafcfb :100644 100644 30479b4... 59042d1... M Makefile The same "independent sets of diff" as before without -c. $ git-diff-tree -r -m -c --abbrev ca18 ca182053c7710a286d72102f4576cf32e0dafcfb ::100644 100644 100644 538d21d... 30479b4... 59042d1... MM Makefile Combined. $ git-diff-tree -r -c --abbrev ca18 ca182053c7710a286d72102f4576cf32e0dafcfb ::100644 100644 100644 538d21d... 30479b4... 59042d1... MM Makefile Asking for combined without -m does not make sense, so -c implies -m. We need to supply -c as default to whatchanged, which is a one-liner. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 11, 2006 at 16:43 UTC 6932c78cb4485380a8ff63575a47a58a4e308bfd
2 files changed +3 -3
diff-tree.c
+2 -2
@@ -6,7 +6,7 @@ static int show_root_diff = 0;
6 static int no_commit_id = 0;
7 static int verbose_header = 0;
8 static int ignore_merges = 1;
9 -static int combine_merges = 1;
9 +static int combine_merges = 0;
10 static int dense_combined_merges = 0;
11 static int read_stdin = 0;
12 static int always_show_header = 0;
@@ -248,7 +248,7 @@ int main(int argc, const char **argv)
248 continue;
249 }
250 if (!strcmp(arg, "-m")) {
251 - combine_merges = ignore_merges = 0;
251 + ignore_merges = 0;
252 continue;
253 }
254 if (!strcmp(arg, "-c")) {
git-whatchanged.sh
+1 -1
@@ -10,7 +10,7 @@ case "$0" in
10 count=
11 test -z "$diff_tree_flags" &&
12 diff_tree_flags=$(git-repo-config --get whatchanged.difftree)
13 - diff_tree_default_flags='-M --abbrev' ;;
13 + diff_tree_default_flags='-c -M --abbrev' ;;
14 *show)
15 count=-n1
16 test -z "$diff_tree_flags" &&