diff options
| author | Alyssa Ross <hi@alyssa.is> | 2023-10-01 15:18:45 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-10-02 11:55:42 -0700 |
| commit | 4adceb5a299164aad1ef9794cdcbdb232ab10299 (patch) | |
| tree | 2f7f857cc9cea4778b6c7e5e4ee1dc0b87caa27b /builtin/commit.c | |
| parent | Git 2.42 (diff) | |
| download | git-4adceb5a299164aad1ef9794cdcbdb232ab10299.tar.gz git-4adceb5a299164aad1ef9794cdcbdb232ab10299.zip | |
diff: fix --merge-base with annotated tags
Checking early for OBJ_COMMIT excludes other objects that can be
resolved to commits, like annotated tags. If we remove it, annotated
tags will be resolved and handled just fine by
lookup_commit_reference(), and if we are given something that can't be
resolved to a commit, we'll still get a useful error message, e.g.:
> error: object 21ab162211ac3ef13c37603ca88b27e9c7e0d40b is a tree, not a commit
> fatal: no merge base found
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
