]> git.ipfire.org Git - thirdparty/git.git/commit
ident: move commit_rewrite_person() to ident.c
authorSiddharth Asthana <siddharthasthana31@gmail.com>
Mon, 18 Jul 2022 19:51:00 +0000 (01:21 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Jul 2022 19:55:53 +0000 (12:55 -0700)
commitdc88e349a297de6b7d0e21d81ac98f7816fcd473
tree0f02ba2cb85045c7d643479183c594db930337ee
parente9c1b0e38cbaf626034c3741cc68f7d706aee451
ident: move commit_rewrite_person() to ident.c

commit_rewrite_person() and rewrite_ident_line() are static functions
defined in revision.c.

Their usages are as follows:
- commit_rewrite_person() takes a commit buffer and replaces the author
  and committer idents with their canonical versions using the mailmap
  mechanism
- rewrite_ident_line() takes author/committer header lines from the
  commit buffer and replaces the idents with their canonical versions
  using the mailmap mechanism.

This patch moves commit_rewrite_person() and rewrite_ident_line() to
ident.c which contains many other functions related to idents like
split_ident_line(). By moving commit_rewrite_person() to ident.c, we
also intend to use it in git-cat-file to replace committer and author
idents from the headers to their canonical versions using the mailmap
mechanism. The function is moved as is for now to make it clear that
there are no other changes, but it will be renamed in a following
commit.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: John Cai <johncai86@gmail.com>
Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
ident.c
revision.c