Skip to content

Commit

Permalink
log: Do not decorate replacements with --no-replace-objects
Browse files Browse the repository at this point in the history
5267d29 (log: decorate "replaced" on to replaced commits, 2011-08-19)
introduced textual decorations for replaced commits, based on the
detection of refs/replace.

Make it so that additionally the use of --no-replace-objects is
detected: I.e. replaced commits are only decorated as replaced when they
are actually replaced.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Aug 26, 2011
1 parent 5267d29 commit b9ad500
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions log-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in

if (!prefixcmp(refname, "refs/replace/")) {
unsigned char original_sha1[20];
if (!read_replace_refs)
return 0;
if (get_sha1_hex(refname + 13, original_sha1)) {
warning("invalid replace ref %s", refname);
return 0;
Expand Down

0 comments on commit b9ad500

Please sign in to comment.