David Aguilar [off-list ref] writes:
Use a strbuf to create the buffer used for the dir-diff tmpdir.
Strip trailing slashes "/" from the value read from TMPDIR to avoid
double-slashes in the calculated paths.
Add a unit test to ensure that double-slashes are not present.
Signed-off-by: David Aguilar <redacted>
---
Changes since v1:
- Updated to use strbuf_trim_trailing_dir_sep().
Thanks Peff!
quoted hunk
@@ -333,11 +332,11 @@ static int checkout_path(unsigned mode, struct object_id *oid,
static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
struct child_process *child)
This is taken hostage by the topic 'ab/retire-option-argument',
which is not yet in 'master' and can never be merged to 'maint',
which is not something you may want to do if this topic is meant as
a bugfix.
I may queue this topic on top of a merge of 'ab/retire-option-argument'
into 'master' for now.
Thanks.