Merge branch 'rs/branch-allow-deleting-dangling'
"git branch -D <branch>" used to refuse to remove a broken branch ref that points at a missing commit, which has been corrected. * rs/branch-allow-deleting-dangling: branch: allow deleting dangling branches with --force
This commit is contained in:
@ -168,7 +168,7 @@ static int check_branch_commit(const char *branchname, const char *refname,
|
||||
int kinds, int force)
|
||||
{
|
||||
struct commit *rev = lookup_commit_reference(the_repository, oid);
|
||||
if (!rev) {
|
||||
if (!force && !rev) {
|
||||
error(_("Couldn't look up commit object for '%s'"), refname);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user