зеркало из https://github.com/microsoft/git.git
Merge branch 'jn/merge-no-edit-fix'
* jn/merge-no-edit-fix: merge: do not launch an editor on "--no-edit $tag" Conflicts: builtin/merge.c
This commit is contained in:
Коммит
5cdc9fbb08
|
@ -1324,6 +1324,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
|
||||||
merge_remote_util(commit) &&
|
merge_remote_util(commit) &&
|
||||||
merge_remote_util(commit)->obj &&
|
merge_remote_util(commit)->obj &&
|
||||||
merge_remote_util(commit)->obj->type == OBJ_TAG) {
|
merge_remote_util(commit)->obj->type == OBJ_TAG) {
|
||||||
|
if (option_edit < 0)
|
||||||
option_edit = 1;
|
option_edit = 1;
|
||||||
allow_fast_forward = 0;
|
allow_fast_forward = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -683,4 +683,16 @@ test_expect_success GPG 'merge --ff-only tag' '
|
||||||
test_cmp actual expect
|
test_cmp actual expect
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success GPG 'merge --no-edit tag should skip editor' '
|
||||||
|
git reset --hard c0 &&
|
||||||
|
git commit --allow-empty -m "A newer commit" &&
|
||||||
|
git tag -f -s -m "A newer commit" signed &&
|
||||||
|
git reset --hard c0 &&
|
||||||
|
|
||||||
|
EDITOR=false git merge --no-edit signed &&
|
||||||
|
git rev-parse signed^0 >expect &&
|
||||||
|
git rev-parse HEAD^2 >actual &&
|
||||||
|
test_cmp actual expect
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Загрузка…
Ссылка в новой задаче