Skip to content

Commit b9ad500

Browse files
Michael J Grubergitster
authored andcommitted
log: Do not decorate replacements with --no-replace-objects
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5267d29 commit b9ad500

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

log-tree.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
9797

9898
if (!prefixcmp(refname, "refs/replace/")) {
9999
unsigned char original_sha1[20];
100+
if (!read_replace_refs)
101+
return 0;
100102
if (get_sha1_hex(refname + 13, original_sha1)) {
101103
warning("invalid replace ref %s", refname);
102104
return 0;

0 commit comments

Comments
 (0)