Merge branch 'fc/cleanups'
* fc/cleanups: test: rebase: fix --interactive test test: trivial cleanups remote: trivial style cleanup
This commit is contained in:
commit
7221dd301b
3
remote.c
3
remote.c
@ -1474,8 +1474,7 @@ struct branch *branch_get(const char *name)
|
||||
ret->remote = remote_get(ret->remote_name);
|
||||
if (ret->merge_nr) {
|
||||
int i;
|
||||
ret->merge = xcalloc(sizeof(*ret->merge),
|
||||
ret->merge_nr);
|
||||
ret->merge = xcalloc(ret->merge_nr, sizeof(*ret->merge));
|
||||
for (i = 0; i < ret->merge_nr; i++) {
|
||||
ret->merge[i] = xcalloc(1, sizeof(**ret->merge));
|
||||
ret->merge[i]->src = xstrdup(ret->merge_name[i]);
|
||||
|
@ -64,10 +64,11 @@ test_expect_success 'rebase with --merge' '
|
||||
|
||||
test_expect_success 'rebase --skip with --merge' '
|
||||
git rebase --skip
|
||||
'
|
||||
'
|
||||
|
||||
test_expect_success 'merge and reference trees equal' \
|
||||
'test -z "`git diff-tree skip-merge skip-reference`"'
|
||||
test_expect_success 'merge and reference trees equal' '
|
||||
test -z "`git diff-tree skip-merge skip-reference`"
|
||||
'
|
||||
|
||||
test_expect_success 'moved back to branch correctly' '
|
||||
test refs/heads/skip-merge = $(git symbolic-ref HEAD)
|
||||
|
@ -692,7 +692,7 @@ test_expect_success 'rebase -i can copy notes' '
|
||||
test_commit n2 &&
|
||||
test_commit n3 &&
|
||||
git notes add -m"a note" n3 &&
|
||||
git rebase --onto n1 n2 &&
|
||||
git rebase -i --onto n1 n2 &&
|
||||
test "a note" = "$(git notes show HEAD)"
|
||||
'
|
||||
|
||||
|
@ -28,29 +28,21 @@ test_expect_success setup '
|
||||
'
|
||||
|
||||
test_expect_success 'cherry-pick an empty commit' '
|
||||
git checkout master && {
|
||||
git cherry-pick empty-branch^
|
||||
test "$?" = 1
|
||||
}
|
||||
git checkout master &&
|
||||
test_expect_code 1 git cherry-pick empty-branch^
|
||||
'
|
||||
|
||||
test_expect_success 'index lockfile was removed' '
|
||||
|
||||
test ! -f .git/index.lock
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'cherry-pick a commit with an empty message' '
|
||||
git checkout master && {
|
||||
git cherry-pick empty-branch
|
||||
test "$?" = 1
|
||||
}
|
||||
git checkout master &&
|
||||
test_expect_code 1 git cherry-pick empty-branch
|
||||
'
|
||||
|
||||
test_expect_success 'index lockfile was removed' '
|
||||
|
||||
test ! -f .git/index.lock
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '
|
||||
@ -101,7 +93,7 @@ test_expect_success 'cherry-pick a no-op with --keep-redundant' '
|
||||
git reset --hard &&
|
||||
git checkout fork^0 &&
|
||||
git cherry-pick --keep-redundant-commits master &&
|
||||
git show -s --format='%s' >actual &&
|
||||
git show -s --format=%s >actual &&
|
||||
echo "add file2 on master" >expect &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
Loading…
Reference in New Issue
Block a user