git-email-contacts

email yourself patches from git-contacts
git clone git://jb55.com/git-email-contacts
Log | Files | Refs | README | LICENSE

commit 11c14c6fe6d8ec69f293ffe84574fd31e6265846
parent c5390d20e8e19769ab02198852db63df50b6bb42
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 23 Jun 2021 12:22:33 -0700

configurable cccmd

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mgit-email-contacts | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/git-email-contacts b/git-email-contacts @@ -6,6 +6,9 @@ import os dir = $(git rev-parse --show-toplevel).strip() name = $(git config user.name).strip() email = $(git config user.email).strip() +cc_cmd = $(git config sendmail.cccmd).strip() +cc_cmd = cc_cmd if cc_cmd != "" else "git-contacts" + user = f"{name} <{email}>" fresh_file = os.path.join(dir, "contacts_fresh_hashes") tmp_file = os.path.join(dir, "contacts_new_hashes") @@ -25,7 +28,9 @@ new_hashes = $(grep -Fxvf @(tmp_file) @(fresh_file)).split("\n") with open(contacts_tsv, "a") as contacts: for hash in new_hashes: - emails = $(git-contacts @(hash)^-).split("\n") + if hash == "": + continue + emails = $(@(cc_cmd) @(hash)^-).split("\n") emails = filter(lambda e: e != "", emails) for email in emails: if email == user: