From: Petr Baudis Date: Thu, 25 Sep 2008 18:14:51 +0000 (+0200) Subject: tg import: Construct actually proper .topmsg file X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=67ae5b2708ea78bf3d9eaa21cb4f0096cfeb4012 tg import: Construct actually proper .topmsg file --- diff --git a/tg-import.sh b/tg-import.sh index 2a24fbb..424f518 100644 --- a/tg-import.sh +++ b/tg-import.sh @@ -42,7 +42,11 @@ git update-index --ignore-submodules --refresh || exit get_commit_msg() { commit="$1" - git log -1 --pretty=format:"From: %an <%ae>%n%n%s%n%n%b" "$commit" + headers="" + ! header="$(git config topgit.to)" || headers="$headers%nTo: $header" + ! header="$(git config topgit.cc)" || headers="$headers%nCc: $header" + ! header="$(git config topgit.bcc)" || headers="$headers%nBcc: $header" + git log -1 --pretty=format:"From: %an <%ae>$headers%nSubject: %s%n%n%b" "$commit" } get_branch_name()