aboutsummaryrefslogtreecommitdiffstats
path: root/commit.c
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-02-05 18:19:22 +0100
committerJunio C Hamano <gitster@pobox.com>2020-02-05 10:23:42 -0800
commit3e2feb0d64c994d343b42a62bd521fb5d6bdfe02 (patch)
tree2be948118054982014f771bdc2419f26885f77b1 /commit.c
parentGit 2.25 (diff)
downloadgit-3e2feb0d64c994d343b42a62bd521fb5d6bdfe02.tar.gz
git-3e2feb0d64c994d343b42a62bd521fb5d6bdfe02.zip
name-rev: rewrite create_or_update_name()
This code was moved straight out of name_rev(). As such, we inherited the "goto" to jump from an if into an else-if. We also inherited the fact that "nothing to do -- return NULL" is handled last. Rewrite the function to first handle the "nothing to do" case. Then we can handle the conditional allocation early before going on to populate the struct. No need for goto-ing. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions