Staging
v0.5.1
https://github.com/git/git
Revision 93dcab2937624ebb97f91807576cddb242a55a46 authored by Junio C Hamano on 26 November 2005, 00:35:20 UTC, committed by Junio C Hamano on 26 November 2005, 00:35:20 UTC
This is not 1.0rc4 yet, but to push the recent fixes out.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2 parent s 52b6536 + 2a1ddc5
Raw File
Tip revision: 93dcab2937624ebb97f91807576cddb242a55a46 authored by Junio C Hamano on 26 November 2005, 00:35:20 UTC
GIT 0.99.9k
Tip revision: 93dcab2
git-add.sh
#!/bin/sh

usage() {
    die "usage: git add [-n] [-v] <file>..."
}

show_only=
verbose=
while : ; do
  case "$1" in
    -n)
	show_only=true
	;;
    -v)
	verbose=--verbose
	;;
    -*)
	usage
	;;
    *)
	break
	;;
  esac
  shift
done

GIT_DIR=$(git-rev-parse --git-dir) || exit

if test -f "$GIT_DIR/info/exclude"
then
	git-ls-files -z \
	--exclude-from="$GIT_DIR/info/exclude" \
	--others --exclude-per-directory=.gitignore -- "$@"
else
	git-ls-files -z \
	--others --exclude-per-directory=.gitignore -- "$@"
fi |
case "$show_only" in
true)
	xargs -0 echo ;;
*)
	git-update-index --add $verbose -z --stdin ;;
esac
back to top