diff options
author | Alexandre Julliard <julliard@winehq.org> | 2007-08-11 23:59:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-13 12:58:38 -0700 |
commit | d616813d75b888b7c29bbad19808fe5cffa5380c (patch) | |
tree | 822ae0e97f9ae00643bf9aee04f29af684bbd2a1 /t | |
parent | 77b258f436874bdd1caecd4b3c9c63e3d49bd147 (diff) | |
download | git-d616813d75b888b7c29bbad19808fe5cffa5380c.tar.gz |
git-add: Add support for --refresh option.
This allows to refresh only a subset of the project files, based on
the specified pathspecs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3700-add.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 213e9249da..a328bf57eb 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -143,4 +143,16 @@ test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over st git ls-files --stage | grep "^120000 .* 0 symlink$" ' +test_expect_success 'git add --refresh' ' + >foo && git add foo && git commit -a -m "commit all" && + test -z "`git diff-index HEAD -- foo`" && + git read-tree HEAD && + case "`git diff-index HEAD -- foo`" in + :100644" "*"M foo") echo ok;; + *) echo fail; (exit 1);; + esac && + git add --refresh -- foo && + test -z "`git diff-index HEAD -- foo`" +' + test_done |