Jordan DE GEA writes:
>>> +test_expect_success '"add" using shorthand - fails when no previous
>>> branch' '
>>> + test_must_fail git worktree add existing -
>>> +'
>>
>> Just an observation, but the error message we would see here might
>> be interesting.
>
>
Matthieu Moy writes:
> Junio C Hamano writes:
>
>> Jordan DE GEA writes:
>>
>>> + branch=$(cd short-hand && git rev-parse --symbolic-full-name HEAD) &&
>>> + test "$branch" = refs/heads/newbranch &&
>>> + cd
>> +test_expect_success '"add" using shorthand - fails when no previous branch'
>> '
>> +test_must_fail git worktree add existing -
>> +'
>
> Just an observation, but the error message we would see here might
> be interesting.
Of course, that’s useful to be sure of the error, I will do in
Junio C Hamano writes:
> Jordan DE GEA writes:
>
>> +branch=$(cd short-hand && git rev-parse --symbolic-full-name HEAD) &&
>> +test "$branch" = refs/heads/newbranch &&
>> +cd ..
>
> If any of the command between "cd short-hand" and
Jordan DE GEA writes:
> From: Jordan DE GEA
>
> Since `git worktree add` uses `git checkout` when `[]` is used,
> and `git checkout -` is already supported, it makes sense to allow the
> same shortcut in `git worktree add`.
From: Jordan DE GEA
Since `git worktree add` uses `git checkout` when `[]` is used,
and `git checkout -` is already supported, it makes sense to allow the
same shortcut in `git worktree add`.
Signed-off-by: Matthieu Moy
6 matches
Mail list logo