File: 0005-Fixing-shellcheck-errors-found-during-docker-test.patch

package info (click to toggle)
git-subrepo 0.4.9-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,552 kB
  • sloc: sh: 7,074; makefile: 273; perl: 226
file content (73 lines) | stat: -rw-r--r-- 2,195 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From: =?UTF-8?q?Samo=20Poga=C4=8Dnik?= <samo_pogacnik@t-2.net>
Date: Sun, 17 Nov 2024 09:19:19 +0100
Forwarded: https://github.com/ingydotnet/git-subrepo/pull/639
Subject: Fixing shellcheck errors found during docker-test

---
 test/issue29.t | 4 ++--
 test/issue95.t | 2 +-
 test/issue96.t | 2 +-
 test/setup     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/issue29.t b/test/issue29.t
index 57df236..685bd43 100644
--- a/test/issue29.t
+++ b/test/issue29.t
@@ -40,7 +40,7 @@ cd "$TMP"
   touch main1
   git add main1
   git commit -m "Initial main1"
-  git subrepo clone ../share share -b "$DEFAULTBRANCH"
+  git subrepo clone ../share share -b "${DEFAULTBRANCH}"
 ) > /dev/null
 
 # `subrepo clone` the share repo into main2:
@@ -49,7 +49,7 @@ cd "$TMP"
   touch main2
   git add main2
   git commit -m "Initial main2"
-  git subrepo clone ../share share -b "$DEFAULTBRANCH"
+  git subrepo clone ../share share -b "${DEFAULTBRANCH}"
 ) > /dev/null
 
 
diff --git a/test/issue95.t b/test/issue95.t
index b268fbe..1049af3 100644
--- a/test/issue95.t
+++ b/test/issue95.t
@@ -46,7 +46,7 @@ use Test::More
         touch feature
         git add feature
         git commit -m "feature added"
-        git checkout "$DEFAULTBRANCH"
+        git checkout "${DEFAULTBRANCH}"
     ) &> /dev/null
 
     # Commit directly to subrepo
diff --git a/test/issue96.t b/test/issue96.t
index 1b16567..3050965 100644
--- a/test/issue96.t
+++ b/test/issue96.t
@@ -87,7 +87,7 @@ use Test::More
     # expected: successful push without conflicts
     is "$(
             cd host
-            git subrepo push sub -b "$DEFAULTBRANCH" -u
+            git subrepo push sub -b "${DEFAULTBRANCH}" -u
     )" \
        "Subrepo 'sub' pushed to '../sub' ($DEFAULTBRANCH)."
 
diff --git a/test/setup b/test/setup
index baea72d..ac315e9 100644
--- a/test/setup
+++ b/test/setup
@@ -49,7 +49,7 @@ mkdir -p "$UPSTREAM" "$OWNER" "$COLLAB"
 cp -r test/repo/{foo,bar,init} "$UPSTREAM/"
 
 DEFAULTBRANCH=$( git config --global --get init.defaultbranch || true )
-[[ -z $DEFAULTBRANCH ]] && DEFAULTBRANCH="master"
+[[ -z "${DEFAULTBRANCH}" ]] && DEFAULTBRANCH="master"
 export DEFAULTBRANCH
 
 ###