summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-04-25 09:54:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-26 03:52:57 (GMT)
commitfef461ea5d53dd84c6d946f57a018ffc9f391a05 (patch)
tree08f1ddeb9c54d1b18d7cb874e487b15f7e298111 /commit.h
parentc5aa6db64f6f43621568bb1fec9360c25dbd2749 (diff)
downloadgit-fef461ea5d53dd84c6d946f57a018ffc9f391a05.zip
git-fef461ea5d53dd84c6d946f57a018ffc9f391a05.tar.gz
git-fef461ea5d53dd84c6d946f57a018ffc9f391a05.tar.bz2
commit: Let the callback of for_each_mergetag return on error
This is yet another patch to be filed under the keyword "libification". There is one subtle change in behavior here, where a `git log` that has been asked to show the mergetags would now stop reporting the mergetags upon the first failure, whereas previously, it would have continued to the next mergetag, if any. In practice, that change should not matter, as it is 1) uncommon to perform octopus merges using multiple tags as merge heads, and 2) when the user asks to be shown those tags, they really should be there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.h b/commit.h
index 0fb8271..9000895 100644
--- a/commit.h
+++ b/commit.h
@@ -291,10 +291,10 @@ extern const char *find_commit_header(const char *msg, const char *key,
/* Find the end of the log message, the right place for a new trailer. */
extern int ignore_non_trailer(const char *buf, size_t len);
-typedef void (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
+typedef int (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
void *cb_data);
-extern void for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void *data);
+extern int for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void *data);
struct merge_remote_desc {
struct object *obj; /* the named object, could be a tag */