From: Junio C Hamano Date: Sun, 18 Nov 2018 09:23:54 +0000 (+0900) Subject: Merge branch 'jk/verify-sig-merge-into-void' X-Git-Tag: v2.20.0-rc0~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6d2035ee605980efa9915e10d35e7a355fc74077 Merge branch 'jk/verify-sig-merge-into-void' "git merge" and "git pull" that merges into an unborn branch used to completely ignore "--verify-signatures", which has been corrected. * jk/verify-sig-merge-into-void: pull: handle --verify-signatures for unborn branch merge: handle --verify-signatures for unborn branch merge: extract verify_merge_signature() helper --- 6d2035ee605980efa9915e10d35e7a355fc74077 diff --cc commit.h index 03ab19508f,8e3aeb1114..98664536cb --- a/commit.h +++ b/commit.h @@@ -334,12 -357,13 +334,20 @@@ extern int remove_signature(struct strb */ extern int check_commit_signature(const struct commit *commit, struct signature_check *sigc); +/* record author-date for each commit object */ +struct author_date_slab; +void record_author_date(struct author_date_slab *author_date, + struct commit *commit); + +int compare_commits_by_author_date(const void *a_, const void *b_, void *unused); ++ + /* + * Verify a single commit with check_commit_signature() and die() if it is not + * a good signature. This isn't really suitable for general use, but is a + * helper to implement consistent logic for pull/merge --verify-signatures. + */ + void verify_merge_signature(struct commit *commit, int verbose); + int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused); int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_, void *unused);