diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-12-20 21:16:02 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-20 22:30:45 +0300 |
commit | b44171725646880db07cbee6446e15b4afaa1930 (patch) | |
tree | 45aa573c98f021a7bd5b866e74b421eda1ad61fe /add-interactive.c | |
parent | 9291e6329ef3333f9447b0b4cdec0607e00c39cf (diff) |
t1507: inline full_name()
Before, we were running `test_must_fail full_name`. However,
`test_must_fail` should only be used on git commands. Inline full_name()
so that we can use test_must_fail on the git command directly.
When full_name() was introduced in 28fb84382b (Introduce
<branch>@{upstream} notation, 2009-09-10), the `git -C` option wasn't
available yet (since it was introduced in 44e1e4d67d (git: run in a
directory given with -C option, 2013-09-09)). As a result, the helper
function removed the need to manually cd each time. However, since
`git -C` is available now, we can just use that instead and inline
full_name().
An alternate approach was taken where we taught full_name() to accept an
optional `!` arg to trigger test_must_fail behavior. However, this added
more unnecessary complexity than inlining so we inline instead.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'add-interactive.c')
0 files changed, 0 insertions, 0 deletions