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

Re: [PATCH v8 1/5] Introduce bulk-move detection in diffcore.

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 30, 2010, 00:26 UTC
Message-ID
<20101030002600.GC21410@burratino>
In-Reply-To
<20101029211852.GB5695@home.lan>
Yann Dirson wrote:
> Hm, I fear too much granularity would become meaningless :)
[...]
>                 If the code needs to be easier to understand, I'd
> rather add some more doc, than added commits that are basically
> "useless for bisect".

Yes, the example list was probably a little overboard. Even so, the idea was to maintain bisectability by introducing a few tests at a time. That way, the fallout of a subfeature can easily be found with "git bisect", among other benefits[1].

I might try it out some time soon; don't worry about it if you don't like the idea. :)

> On Thu, Oct 28, 2010 at 08:45:40PM -0500, Jonathan Nieder wrote:
>> 1. introduce DETECT_DIRECTORY_RENAMES flag and hidden UI for it.
>
> What do you mean by "hidden UI" ?

PARSE_OPT_HIDDEN (i.e., a commandline option not tempting readers by listing in -h).

Show 5 quoted lines
>> Is the debugging output infrequent enough to just use a function
>> unconditionally?
>
> You mean, keep funccalls even with DEBUG_BULKMOVE is not set ?  No,
> there are too many traces for that.
Yep, that's what I meant.  Alas.

Will the debugging output still be useful once the code is known to work reliably? If not, I guess we can remove it at that point (avoiding the need to worry about patches that may introduce

	debug_bulkmove(expression that does not even
		       typecheck);
down the line).
Show 11 quoted lines
> Ah, sure the dst==src case can be improved.  But I'm not sure
> factorizing writing NUL is worth the cost of re-computing where to put
> it when using mempcpy would avoid.  Wouldn't the following be more
> adequate ?
> 
> 	if (dst != src) {
> 		end = mempcpy(dst, src, slash - src + 1);
> 		*end = '\0';
> 	} else
> 		dst[slash - src + 1] = '\0';
> 	return dst;

I doubt the difference is measurable. But that looks fine (micronit: I suppose one should put the dst == src case first in that case).

Jonathan

[1] The example that set me on this path to madness: http://thread.gmane.org/gmane.comp.version-control.git/151086/focus=158913

Previous: Yann DirsonNext: Yann Dirson
Message 5 of 15 in “Detection of directory renames”
  1. Detection of directory renamesYann Dirson, Oct 28, 2010
  2. 1/5 Introduce bulk-move detection in diffcore.Yann Dirson, Oct 28, 2010
  3. Jonathan NiederOct 29, 2010
  4. Yann DirsonOct 29, 2010
  5. Jonathan NiederOct 30, 2010
  6. Yann DirsonNov 4, 2010
  7. Introduce bulk-move detection in diffcore.Yann Dirson, Nov 4, 2010
  8. Ævar Arnfjörð BjarmasonNov 25, 2010
  9. Jonathan NiederNov 25, 2010
  10. Ævar Arnfjörð BjarmasonNov 25, 2010
  11. 2/5 Raw diff output format for bulk moves.Yann Dirson, Oct 28, 2010
  12. 3/5 Add testcases for the --detect-bulk-moves diffcore flag.Yann Dirson, Oct 28, 2010
  13. 4/5 Unified diff output format for bulk moves.Yann Dirson, Oct 28, 2010
  14. 5/5 [WIP] Allow hiding renames of individual files involved in a directory rename.Yann Dirson, Oct 28, 2010
  15. Jonathan NiederOct 29, 2010

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.