Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diff --no-index: reset temporary buffer lengths on directory iteration
Commit 875b91b (diff --no-index: use strbuf for temporary pathnames, 2012-04-25) introduced a regression when using diff --no-index with directories. When iterating through a directory, the switch to strbuf from heap-allocated char arrays caused paths to form like 'dir/file1', 'dir/file1file2', rather than 'dir/file1', 'dir/file2' as expected. Avoid this by resetting the paths variables to their original length before each iteration. Signed-off-by: Bobby Powers <firstname.lastname@example.org> Reviewed-by: René Scharfe <email@example.com> Signed-off-by: Junio C Hamano <firstname.lastname@example.org>
- Loading branch information
Showing 2 changed files with 25 additions and 0 deletions.