Re: [PATCH v3 21/33] merge-recursive: add get_directory_renames()
From: Elijah Newren <hidden>
Date: 2017-11-26 01:45:42
From: Elijah Newren <hidden>
Date: 2017-11-26 01:45:42
On Sat, Nov 25, 2017 at 4:52 PM, Johannes Schindelin [off-list ref] wrote:
On Tue, 21 Nov 2017, Elijah Newren wrote:quoted
diff --git a/merge-recursive.c b/merge-recursive.c
<snip>
quoted
+ if (old_len != new_len || strncmp(old_path, new_path, old_len)) { + *old_dir = strndup(old_path, old_len); + *new_dir = strndup(new_path, new_len);These two callers of strndup() are the only ones in Git's code base now. It is also causing a compile error on Windows. Any reason you did not use xstrndup() here? Ciao, Dscho
Nope, was just unaware. I'll go ahead and switch them over for my next roll of the series. Sorry for the pain.