diff options
author | 2019-06-13 13:19:40 -0700 | |
---|---|---|
committer | 2019-06-13 13:19:40 -0700 | |
commit | 0d107b19890db191c9281bff67180389fb53df24 (patch) | |
tree | d61a6fbd1e41b07107b7a686402c92f5283f7670 /t | |
parent | Merge branch 'en/fast-export-encoding' (diff) | |
parent | worktree add: sanitize worktree names (diff) | |
download | tgif-0d107b19890db191c9281bff67180389fb53df24.tar.xz |
Merge branch 'nd/worktree-name-sanitization'
In recent versions of Git, per-worktree refs are exposed in
refs/worktrees/<wtname>/ hierarchy, which means that worktree names
must be a valid refname component. The code now sanitizes the names
given to worktrees, to make sure these refs are well-formed.
* nd/worktree-name-sanitization:
worktree add: sanitize worktree names
Diffstat (limited to 't')
-rwxr-xr-x | t/t2400-worktree-add.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh index 286bba35d8..c989dbe321 100755 --- a/t/t2400-worktree-add.sh +++ b/t/t2400-worktree-add.sh @@ -570,4 +570,9 @@ test_expect_success '"add" an existing locked but missing worktree' ' git worktree add --force --force --detach gnoo ' +test_expect_success FUNNYNAMES 'sanitize generated worktree name' ' + git worktree add --detach ". weird*..?.lock.lock" && + test -d .git/worktrees/---weird-.- +' + test_done |