From: Salikh Zakirov <salikh.zakirov@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>
Subject: [PATCH/BUG] Test for git-add -u from the subdirectory
Date: Mon, 13 Aug 2007 19:54:15 +0900 [thread overview]
Message-ID: <20070813105415.GC14775@makoto.sib> (raw)
---
The following modification to the t2200-add-update.sh
shows that the git-add -u from the subdirectory does not work
with path limiters.
The test modification alone fails on master. I've tried
the revision 93c44d49 'git-add: allow path limiting with -u',
which introduced 'git-add -u', and it fails the test as well.
So technically, this feature never worked.
I use it as
[alias]
ci = add -u
# used to be
#ci = update-index
# and worked
and the simplest workaround is to use git-add instead of git-ci.
t/t2200-add-update.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 0a703af..93c007d 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -35,4 +35,12 @@ test_expect_success 'update did not touch other tracked files' \
test_expect_success 'update did not touch untracked files' \
'test "`git diff-files --name-status dir/other`" = ""'
+test_expect_success 'more changes' 'echo modified >> dir/sub'
+
+test_expect_success 'update from subdirectory' \
+ '(cd dir; git add -u sub)'
+
+test_expect_success 'update touched correct path' \
+ 'test "`git diff-files --name-status dir/sub`" = ""'
+
test_done
--
1.5.2.rc3.5.g93c44
reply other threads:[~2007-08-13 10:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070813105415.GC14775@makoto.sib \
--to=salikh.zakirov@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).