summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2008-11-01 11:44:28 +0000
committerJannis Pohlmann <jannis@xfce.org>2008-11-01 11:44:28 +0000
commit23dee160db2f98548acc4ffdef07e179a011cfa7 (patch)
tree0371a0837b58920ef0db455988cb93d757c9f8e1 /scripts
parentb1be936216c8eab9cd2a6fdf133a3eb7264a9f9a (diff)
downloadxfce4-dev-tools-23dee160db2f98548acc4ffdef07e179a011cfa7.tar.gz
* scripts/xdt-commit: Automatically add ChangeLog files of git
repositories to the commit with "git add ${CHANGELOG}". Use "git diff --cached" instead of "git diff HEAD" for the commit messages. (Old svn revision: 28557)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/xdt-commit9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/xdt-commit b/scripts/xdt-commit
index 2fe6bd0..43db375 100755
--- a/scripts/xdt-commit
+++ b/scripts/xdt-commit
@@ -2,7 +2,7 @@
#
# $Id$
#
-# Copyright (c) 2007
+# Copyright (c) 2007-2008
# The Xfce development team. All rights reserved.
#
# Written for Xfce by Jannis Pohlmann <jannis@xfce.org>.
@@ -93,11 +93,16 @@ for CHANGELOG in $CHANGELOGS; do
# Check if file is versioned
if [ "$STATUS" != "?" ]; then
+ # Add changelog to the commit
+ if [ "$repo_type" = "git" ]; then
+ git add "${CHANGELOG}"
+ fi
+
# Parse output
if [ "$repo_type" = "svn" ]; then
MSG=$(svn diff "${CHANGELOG}")
elif [ "$repo_type" = "git" ]; then
- MSG=$(git diff HEAD "${CHANGELOG}")
+ MSG=$(git diff --cached "${CHANGELOG}")
fi
MSG=$(echo "$MSG" | grep -P '^\+\t' | sed 's/^+//')