Browse Source

Improved bin/sde-list-changes to really detect changes on git repos

misl/sde-wrapper
Alejandro Mery 17 years ago
parent
commit
40097ca6b5
1 changed files with 21 additions and 2 deletions
  1. +21
    -2
      bin/sde-list-changes

+ 21
- 2
bin/sde-list-changes

@ -54,9 +54,28 @@ print_error() { echo "$@" >&2; }
[ -d "$root" ] || echo_abort 1 "$root: Invalid root directory."
cd "$root"
if [ -d ".git" ]; then
if [ -d '.git' ]; then
# git
true
#
# changed files
git-diff-index --name-only HEAD "$@" -M -C &
# untracked files
exclude=
[ ! -f '.gitignore' ] || exclude="-X .gitignore"
git-ls-files --others --directory $exclude "$@" | while read f; do
# be sure to not include sub-projects
if [ -d "$f/.git" -o -d "$f/.svn" ]; then
# skip sub-projects
continue
else
echo "$f"
fi
done
# wait for git-diff-index
wait
else
print_error "$root: Invalid Version Control System."
fi

Loading…
Cancel
Save