author | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Dec 2009 06:43:04 +0000 (22:43 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Dec 2009 09:24:56 +0000 (01:24 -0800) | ||
commit | 99c419c91554e9f60940228006b7d39d42704da7 | |
tree | 4ce2131767fb35c2f6b9359ce8e44fd5969f7533 | tree | snapshot |
parent | c2ff10c98e22ae64d553273e6d67bb123a1c916f | commit | diff |
branch -d: base the "already-merged" safety on the branch it merges with
When a branch is marked to merge with another ref (e.g. local 'next' that
merges from and pushes back to origin's 'next', with 'branch.next.merge'
set to 'refs/heads/next'), it makes little sense to base the "branch -d"
safety, whose purpose is not to lose commits that are not merged to other
branches, on the current branch. It is much more sensible to check if it
is merged with the other branch it merges with.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a branch is marked to merge with another ref (e.g. local 'next' that
merges from and pushes back to origin's 'next', with 'branch.next.merge'
set to 'refs/heads/next'), it makes little sense to base the "branch -d"
safety, whose purpose is not to lose commits that are not merged to other
branches, on the current branch. It is much more sensible to check if it
is merged with the other branch it merges with.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-branch.c | diff | blob | history | |
t/t3200-branch.sh | diff | blob | history |