File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ cd "$local_repo_folder" || return 1
15
15
if [[ $clone_depth == " 0" ]]; then
16
16
git clone " $url " --no-single-branch --no-tags # get branches, but not tags
17
17
else
18
- # WARN depth=2 ensures that amending a shallow commit does not result in a
18
+ # WARN depth=1 is dangerous, as amending such a commit does result in a
19
19
# new commit without parent, effectively destroying git history (!!)
20
20
[[ $clone_depth == " 1" ]] && clone_depth=2
21
21
@@ -39,9 +39,10 @@ if [[ "$restore_mtime" == "1" ]]; then
39
39
fi
40
40
41
41
# ───────────────────────────────────────────────────────────────────────────────
42
- # FORK ON CLONE (if owner)
42
+ # FORK ON CLONE (if not owner)
43
43
44
- if [[ " $ownerOfRepo " != " 1" && " $fork_on_clone " == " 1" ]]; then
44
+ # INFO Alfred stores checkbox settings as `"1"` or `"0"`, and variables in stringified form.
45
+ if [[ " $ownerOfRepo " != " true" && " $fork_on_clone " == " 1" ]]; then
45
46
if [[ ! -x " $( command -v gh) " ]]; then print " \` gh\` not installed." && return 1; fi
46
47
47
48
gh repo fork --remote=false
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ function run() {
134
134
135
135
return JSON . stringify ( {
136
136
items : scriptFilterArr ,
137
- variables : { ownerOfRepo : "1 " } ,
137
+ variables : { ownerOfRepo : "true " } ,
138
138
cache : {
139
139
seconds : 15 , // short, since cloned repos should be available immediately
140
140
loosereload : true ,
You can’t perform that action at this time.
0 commit comments