git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] builtin/diff.c: remove duplicated call to diff_result_code()
@ 2011-03-22 21:45 Junio C Hamano
  2011-03-22 21:50 ` [PATCH 1/3] diffcore-rename: refactor "too many candidates" logic Junio C Hamano
  0 siblings, 1 reply; 25+ messages in thread
From: Junio C Hamano @ 2011-03-22 21:45 UTC (permalink / raw)
  To: git; +Cc: Jeff King

The return value from builtin_diff_files() is fed to diff_result_code()
by the caller, and all other callees like builtin_diff_index() do not
have their own call to diff_result_code().  Remove the duplicated one
from builtin_diff_files() and let the caller handle it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * This probably does not make a difference right now, but it will at
   the end of the rebased 'rename-degrade-cc-to-c' series.

 builtin/diff.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/builtin/diff.c b/builtin/diff.c
index 4c9deb2..171ac39 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -207,7 +207,6 @@ static void refresh_index_quietly(void)
 
 static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv)
 {
-	int result;
 	unsigned int options = 0;
 
 	while (1 < argc && argv[1][0] == '-') {
@@ -241,8 +240,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
 		perror("read_cache_preload");
 		return -1;
 	}
-	result = run_diff_files(revs, options);
-	return diff_result_code(&revs->diffopt, result);
+	return run_diff_files(revs, options);
 }
 
 int cmd_diff(int argc, const char **argv, const char *prefix)

^ permalink raw reply related	[flat|nested] 25+ messages in thread
* [PATCH 0/3] Falling back "diff -C -C" to "diff -C" more gracefully
@ 2011-01-06 21:50 Junio C Hamano
  2011-01-06 21:50 ` [PATCH 3/3] diffcore-rename: fall back to -C when -C -C busts the rename limit Junio C Hamano
  0 siblings, 1 reply; 25+ messages in thread
From: Junio C Hamano @ 2011-01-06 21:50 UTC (permalink / raw)
  To: git; +Cc: Stefan Haller

In a project with many paths, "diff -C -C" may have too many rename source
candidates (as it tries to use all existing paths) but the rename source
candidates "diff -C" would use may still fit under the rename detection
limit.  Currently, we punt and disable the inexact rename detection
altogether even in such a case.

This weatherballoon series illustrates how diffcore-rename can be tweaked
to allow "-C -C" to fall back to "-C".  Somebody should write a test, but
not today ;-).

Junio C Hamano (3):
  diffcore-rename: refactor "too many candidates" logic
  diffcore-rename: record filepair for rename src
  diffcore-rename: fall back to -C when -C -C busts the rename limit

 diffcore-rename.c |   97 ++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 71 insertions(+), 26 deletions(-)

-- 
1.7.4.rc1.214.g2a4f9

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2011-03-25  9:09 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 21:45 [PATCH] builtin/diff.c: remove duplicated call to diff_result_code() Junio C Hamano
2011-03-22 21:50 ` [PATCH 1/3] diffcore-rename: refactor "too many candidates" logic Junio C Hamano
2011-03-22 21:50   ` [PATCH 2/3] diffcore-rename: record filepair for rename src Junio C Hamano
2011-03-22 21:50   ` [PATCH 3/3] diffcore-rename: fall back to -C when -C -C busts the rename limit Junio C Hamano
2011-03-23 15:58     ` Jeff King
2011-03-23 16:41       ` Junio C Hamano
2011-03-23 16:50         ` Jeff King
2011-03-23 18:17       ` Jeff King
2011-03-23 18:18         ` [PATCH 1/3] pager: save the original stderr when redirecting to pager Jeff King
2011-03-23 18:19         ` [PATCH 2/3] progress: use pager's original_stderr if available Jeff King
2011-03-23 18:19         ` [PATCH 3/3] show: turn on rename progress Jeff King
2011-03-23 21:25           ` Junio C Hamano
2011-03-24 14:50             ` Jeff King
2011-03-24 15:00               ` Junio C Hamano
2011-03-24 17:45                 ` Jeff King
2011-03-24 17:46                   ` [PATCH 1/4] pager: save the original stderr when redirecting to pager Jeff King
2011-03-24 17:47                   ` [PATCH 2/4] progress: use pager's original_stderr if available Jeff King
2011-03-24 17:49                   ` [PATCH 3/4] show: turn on rename detection progress reporting Jeff King
2011-03-24 23:35                     ` Junio C Hamano
2011-03-24 17:51                   ` [PATCH 4/4] diff: " Jeff King
2011-03-25  8:35                     ` Johannes Sixt
2011-03-25  9:09                       ` Jeff King
2011-03-24 23:03                   ` [PATCH 3/3] show: turn on rename progress Junio C Hamano
2011-03-25  6:17                     ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2011-01-06 21:50 [PATCH 0/3] Falling back "diff -C -C" to "diff -C" more gracefully Junio C Hamano
2011-01-06 21:50 ` [PATCH 3/3] diffcore-rename: fall back to -C when -C -C busts the rename limit Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).