chiark / gitweb /
tg import: Construct actually proper .topmsg file
authorPetr Baudis <pasky@suse.cz>
Thu, 25 Sep 2008 18:14:51 +0000 (20:14 +0200)
committerPetr Baudis <pasky@suse.cz>
Thu, 25 Sep 2008 18:14:51 +0000 (20:14 +0200)
tg-import.sh

index 2a24fbb96dfc7e0600416e0eb51bae5bb63a95be..424f51847ac750ee518e5d66b620cb900033a095 100644 (file)
@@ -42,7 +42,11 @@ git update-index --ignore-submodules --refresh || exit
 get_commit_msg()
 {
        commit="$1"
 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()
 }
 
 get_branch_name()