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>
# Usage: find_latest_squash DIR
find_latest_squash () {
assert test $# = 1
+ dir="$1"
debug "Looking for latest squash ($dir)..."
local indent=$(($indent + 1))
- dir="$1"
sq=
main=
sub=