summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-28 21:23:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-29 18:32:49 (GMT)
commitd9f62dfa0ddc31bdad93054acca9fd42ca781f7f (patch)
tree6fd09fd6fcb441b0e494c8439732bd682f4edda3 /builtin/tag.c
parent6a29d7b7a72c7b131ae3cda9e0b47b67a27a51f1 (diff)
downloadgit-d9f62dfa0ddc31bdad93054acca9fd42ca781f7f.zip
git-d9f62dfa0ddc31bdad93054acca9fd42ca781f7f.tar.gz
git-d9f62dfa0ddc31bdad93054acca9fd42ca781f7f.tar.bz2
show_dirstat: simplify same-content check
We use two nested conditionals to store a content_changed variable, but only bother to look at the result once, directly after we set it. We can drop the variable entirely and just use a single "if". This needless complexity is the result of 2ff3a80334 (Teach --dirstat not to completely ignore rearranged lines within a file, 2011-04-11). Before that, we held onto the content_changed variable much longer. While we're touching the condition, we can swap out oidcmp() for !oideq(). Our coccinelle patches didn't previously find this case because of the intermediate variable, but now it's a simple boolean in a conditional. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/tag.c')
0 files changed, 0 insertions, 0 deletions