aboutsummaryrefslogtreecommitdiff
path: root/object-name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-06-30 14:30:30 -0700
committerJunio C Hamano <gitster@pobox.com>2025-06-30 14:30:31 -0700
commit91f10d7ca2c41922a7c8b07aec90167896c5db51 (patch)
treef8b947d7e04cb87548913baac8ba757ff0a20737 /object-name.c
parenta013680162522425ab74d12f1d0cd4df1a389383 (diff)
parentbc303718cc288b54233b204ce88223a16fb38487 (diff)
downloadgit-91f10d7ca2c41922a7c8b07aec90167896c5db51.tar.xz
Merge branch 'bc/stash-export-import'
An interchange format for stash entries is defined, and subcommand of "git stash" to import/export has been added. * bc/stash-export-import: builtin/stash: provide a way to import stashes from a ref builtin/stash: provide a way to export stashes to a ref builtin/stash: factor out revision parsing into a function object-name: make get_oid quietly return an error
Diffstat (limited to 'object-name.c')
-rw-r--r--object-name.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/object-name.c b/object-name.c
index 9288b2dd24..851858975f 100644
--- a/object-name.c
+++ b/object-name.c
@@ -1081,13 +1081,17 @@ static int get_oid_basic(struct repository *r, const char *str, int len,
* still fill in the oid with the "old" value,
* which we can use.
*/
- } else {
+ } else if (!(flags & GET_OID_GENTLY)) {
if (flags & GET_OID_QUIETLY) {
exit(128);
}
die(_("log for '%.*s' only has %d entries"),
len, str, co_cnt);
}
+ if (flags & GET_OID_GENTLY) {
+ free(real_ref);
+ return -1;
+ }
}
}