diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-09-08 13:30:32 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-09-08 13:30:32 -0700 |
| commit | ec8d24f05df6966d229e2078da78ea46aea7b41c (patch) | |
| tree | 30dfc0d377ac9db670439ff5c621dbb1357b0dde /builtin | |
| parent | f0d795428e28fbfe6e86be0779e3d2fbfbdc73b4 (diff) | |
| parent | 597a97748924e8ce0b829f668acc8f7a6849b05f (diff) | |
| download | git-ec8d24f05df6966d229e2078da78ea46aea7b41c.tar.xz | |
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
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/branch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index b23b1d1752..03c7b7253a 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -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; } |
