Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Blain <levraiphilippeblain@gmail.com>2022-10-21 18:13:35 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-21 23:51:05 +0300
commit34ab458cb1df13ca400c10bbc4ff69c75a4e217e (patch)
tree43e33d8527461ee93e6677f4815460e2fb4846f6 /contrib
parent5626a9e2a93e4dd0ce13005a7fc1d74c2c3e4fd2 (diff)
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/subtree/git-subtree.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 89f1eb756f..d91a967907 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -374,10 +374,10 @@ try_remove_previous () {
# 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=