diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2011-08-25 17:09:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-25 19:47:24 -0700 |
commit | b9ad500262843c6110968da1f4e7b6717bc71303 (patch) | |
tree | b97b873eeb47c84c714d575837b9883d38b575e5 /log-tree.c | |
parent | 5267d292ecbdc91018db05275ec6057d2c4cfa18 (diff) | |
download | git-b9ad500262843c6110968da1f4e7b6717bc71303.tar.gz |
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 <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c index 74fc20da4d..c40fa50c6f 100644 --- a/log-tree.c +++ b/log-tree.c @@ -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; |