diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | scripts/xdt-commit | 9 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2008-11-01 Jannis Pohlmann <jannis@xfce.org> + + * 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. + 2008-10-18 Brian Tarricone <bjt23@cornell.edu> * scripts/xdt-commit: Support git/git-svn as well as svn (bug 4491). 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/^+//') |