]> git.ipfire.org Git - thirdparty/git.git/commit
subtree: define a variable before its first use in 'find_latest_squash'
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Fri, 21 Oct 2022 15:13:35 +0000 (15:13 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Oct 2022 20:51:05 +0000 (13:51 -0700)
commit34ab458cb1df13ca400c10bbc4ff69c75a4e217e
tree43e33d8527461ee93e6677f4815460e2fb4846f6
parent5626a9e2a93e4dd0ce13005a7fc1d74c2c3e4fd2
subtree: define a variable before its first use in 'find_latest_squash'

The function 'find_latest_squash' takes a single argument, 'dir', but a
debug statement uses this variable before it takes its value from $1.

This statement thus gets the value of 'dir' from the calling function,
which currently is the same as the 'dir' argument, so it works but it
is confusing.

Move the definition of 'dir' before its first use.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh