Skip to content

Commit a22a947

Browse files
thenigangitster
authored andcommitted
contrib/diffall: comment actual reason for 'cdup'
The comment from an earlier commit did not reflect the actual reason this operation is needed. Signed-off-by: Tim Henigan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 260eb7e commit a22a947

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/diffall/git-diffall

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ fi
3636

3737
start_dir=$(pwd)
3838

39-
# needed to access tar utility
39+
# All the file paths returned by the diff command are relative to the root
40+
# of the working copy. So if the script is called from a subdirectory, it
41+
# must switch to the root of working copy before trying to use those paths.
4042
cdup=$(git rev-parse --show-cdup) &&
4143
cd "$cdup" || {
4244
echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree"

0 commit comments

Comments
 (0)