From: Peter Eisentraut Date: Wed, 21 Jan 2015 02:21:35 +0000 (-0500) Subject: cp-po: Add source commit information to commit message X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=f5dc27d437d2a64ebf3f0ebda5cf6107e771279b;p=pgtranslation%2Fadmin.git cp-po: Add source commit information to commit message Add information about the repository and commit hash of the source (messages) repository to the commit message in the target (postgresql) repository, when -g is used. --- diff --git a/cp-po b/cp-po index ce7a12d..5b569a4 100755 --- a/cp-po +++ b/cp-po @@ -73,6 +73,12 @@ if [ -z "$destdir" ]; then fi if $git_mode; then + cd "$srcdir" + remote=$(git config branch.$(git rev-parse --abbrev-ref HEAD).remote) + remote_url=$(git config remote."$remote".url) + git_hash=$(git rev-parse HEAD) + cd - + GIT_WORK_TREE=$(cd "$destdir" && pwd) export GIT_WORK_TREE GIT_DIR=$GIT_WORK_TREE/.git @@ -216,5 +222,8 @@ if $update_target_tree; then fi if $git_mode; then - git commit -m 'Translation updates' + git commit -m "Translation updates + +Source-Git-URL: $remote_url +Source-Git-Hash: $git_hash" fi