Skip to content

Commit

Permalink
Merge pull request #935 from ax1036/git-un-lock
Browse files Browse the repository at this point in the history
fix git (un)lock with spaced filenames
  • Loading branch information
spacewander authored Aug 11, 2021
2 parents 3821b2c + 296f2a7 commit a07c5ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/git-lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

filename=$1
test -z $filename && echo "filename required." 1>&2 && exit 1
git update-index --skip-worktree $filename
filename="$1"
test -z "$filename" && echo "filename required." 1>&2 && exit 1
git update-index --skip-worktree "$filename"
6 changes: 3 additions & 3 deletions bin/git-unlock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

filename=$1
test -z $filename && echo "filename required." 1>&2 && exit 1
git update-index --no-skip-worktree $filename
filename="$1"
test -z "$filename" && echo "filename required." 1>&2 && exit 1
git update-index --no-skip-worktree "$filename"

0 comments on commit a07c5ec

Please sign in to comment.