Permalink
Browse files

Remove enforced diff move/copy detection

Signed-off-by: Jiri Jaburek <jiri.jabu@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
  • Loading branch information...
1 parent c5aaa84 commit 6d276a6084cef6cab17b5752e123b090195186b7 @comps comps committed with Jun 5, 2012
Showing with 10 additions and 7 deletions.
  1. +4 −0 NEWS
  2. +3 −3 git.h
  3. +1 −2 tig.1.txt
  4. +2 −2 tig.c
View
4 NEWS
@@ -6,6 +6,10 @@ master
Incompatibilities:
+ - Disable diff move/copy detection by default, boosting diff
+ performance on larger projects. Use git config 'diff.renames' option
+ (git-wide) to set your preferred behavior. Environment variable
+ TIG_DIFF_OPTS can be used to restore the old behavior.
- Values set for author-width and filename-width will result in widths
one character bigger than previously.
View
6 git.h
@@ -26,16 +26,16 @@
GIT_DIFF_INITIAL("--cached", context_arg, space_arg, "", new_name)
#define GIT_DIFF_STAGED(context_arg, space_arg, old_name, new_name) \
- "git", "diff-index", ENCODING_ARG, "--root", "--patch-with-stat", "-C", "-M", \
+ "git", "diff-index", ENCODING_ARG, "--root", "--patch-with-stat", \
"--cached", (context_arg), (space_arg), "HEAD", "--", (old_name), (new_name), NULL
#define GIT_DIFF_UNSTAGED(context_arg, space_arg, old_name, new_name) \
- "git", "diff-files", ENCODING_ARG, "--root", "--patch-with-stat", "-C", "-M", \
+ "git", "diff-files", ENCODING_ARG, "--root", "--patch-with-stat", \
(context_arg), (space_arg), "--", (old_name), (new_name), NULL
/* Don't show staged unmerged entries. */
#define GIT_DIFF_STAGED_FILES(output_arg) \
- "git", "diff-index", (output_arg), "--diff-filter=ACDMRTXB", "--cached", "-M", "HEAD", NULL
+ "git", "diff-index", (output_arg), "--diff-filter=ACDMRTXB", "--cached", "HEAD", NULL
#define GIT_DIFF_UNSTAGED_FILES(output_arg) \
"git", "diff-files", (output_arg), NULL
View
@@ -120,8 +120,7 @@ TIG_LS_REMOTE::
TIG_DIFF_OPTS::
The diff options to use in the diff view. The diff view uses
- git-show(1) for formatting and always passes --patch-with-stat,
- --find-copies-harder, and -C.
+ git-show(1) for formatting and always passes --patch-with-stat.
TIG_TRACE::
Path for trace file where information about git commands are logged.
View
4 tig.c
@@ -4153,7 +4153,7 @@ diff_open(struct view *view, enum open_flags flags)
{
static const char *diff_argv[] = {
"git", "show", ENCODING_ARG, "--pretty=fuller", "--no-color", "--root",
- "--patch-with-stat", "--find-copies-harder", "-C",
+ "--patch-with-stat",
opt_notes_arg, opt_diff_context_arg, opt_ignore_space_arg,
"%(diffargs)", "%(commit)", "--", "%(fileargs)", NULL
};
@@ -6859,7 +6859,7 @@ stage_open(struct view *view, enum open_flags flags)
/* Diffs for unmerged entries are empty when passing the new
* path, so leave out the new path. */
static const char *files_unmerged_argv[] = {
- "git", "diff-files", ENCODING_ARG, "--root", "--patch-with-stat", "-C", "-M",
+ "git", "diff-files", ENCODING_ARG, "--root", "--patch-with-stat",
opt_diff_context_arg, opt_ignore_space_arg, "--",
stage_status.old.name, NULL
};

0 comments on commit 6d276a6

Please sign in to comment.