git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] diff: make "too many files" rename warning optional

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
May 3, 2008, 17:34 UTC
Message-ID
<481CA227.1000801@ramsay1.demon.co.uk>
In-Reply-To
<20080430172553.GC23747@sigill.intra.peff.net>
Jeff King wrote:
Show 5 quoted lines
> In many cases, the warning ends up as clutter, because the
> diff is being done "behind the scenes" from the user (e.g.,
> when generating a commit diffstat), and whether we show
> renames or not is not particularly interesting to the user.
> 
[snip]
Show 14 quoted lines
> diff --git a/diffcore-rename.c b/diffcore-rename.c
> index 1369a5e..1b2ebb4 100644
> --- a/diffcore-rename.c
> +++ b/diffcore-rename.c
> @@ -492,7 +492,8 @@ void diffcore_rename(struct diff_options *options)
>  		rename_limit = 32767;
>  	if ((num_create > rename_limit && num_src > rename_limit) ||
>  	    (num_create * num_src > rename_limit * rename_limit)) {
> -		warning("too many files, skipping inexact rename detection");
> +		if (options->warn_on_too_large_rename)
> +			warning("too many files, skipping inexact rename detection");
>  		goto cleanup;
>  	}
>  

This will also fix the problem I had with gitk on cygwin; namely "gitk --all &" on my "git" repo pops up an error dialog (see below), after which the diff display disappears.

The error dialog shows:
--- >8 ---
warning: too many files, skipping inexact rename detection
warning: too many files, skipping inexact rename detection
    while executing
"close $bdf"
    (procedure "getblobdiffline" line 89)
    invoked from within
"getblobdiffline file102daa00 1d6aeb410dc19893adbc0209bcf859f35ff1c7d6"
    ("eval" body line 1)
    invoked from within
"eval $script"
    (procedure "dorunq" line 9)
    invoked from within
"dorunq"
    ("after" script)
--- 8< ---
The git command issued by gitk appears to be:
   git diff-tree -r -p -C --no-commit-id -U3 1d6aeb410dc19893adbc0209bcf859f35ff1c7d6

However, if I type the above into bash (and include --no-pager), then the error message does not appear! Ho hum. Also, the same repo on Linux does not exhibit this problem at all.

In any event, if the above warning() call is commented out, then gitk is quite happy on cygwin as well.

All the best,
Ramsay Jones
Previous: Jeff KingNext: Jeff King
Message 12 of 22 in “warning: too many files, skipping inexact rename detection”
  1. Andrew MortonApr 26, 2008
  2. Jeff KingApr 26, 2008
  3. Andrew MortonApr 26, 2008
  4. Jeff KingApr 26, 2008
  5. 0/3 rename limit improvementsJeff King, Apr 30, 2008
  6. 1/3 add merge.renamelimit config optionJeff King, Apr 30, 2008
  7. Jeff KingApr 30, 2008
  8. Junio C HamanoMay 3, 2008
  9. Jeff KingMay 4, 2008
  10. 2/3 bump rename limit defaultsJeff King, Apr 30, 2008
  11. 3/3 diff: make "too many files" rename warning optionalJeff King, Apr 30, 2008
  12. Ramsay JonesMay 3, 2008
  13. Jeff KingMay 4, 2008
  14. Paul MackerrasMay 4, 2008
  15. Jeff KingMay 5, 2008
  16. Jeff KingMay 5, 2008
  17. Junio C HamanoMay 5, 2008
  18. Paul MackerrasMay 12, 2008
  19. Ramsay JonesMay 6, 2008
  20. Ramsay JonesMay 6, 2008
  21. Junio C HamanoMay 4, 2008
  22. Jeff KingMay 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.