From: Johannes Sixt <johannes.sixt@telecom.at>
To: git@vger.kernel.org
Cc: j.sixt@eudaptics.com, Johannes Sixt <johannes.sixt@telecom.at>
Subject: [PATCH/amend] Test that git add removes stages 1,2,3.
Date: Mon, 2 Jul 2007 13:23:51 +0200 [thread overview]
Message-ID: <1183375431711-git-send-email-johannes.sixt@telecom.at> (raw)
In-Reply-To: <11833750863127-git-send-email-johannes.sixt@telecom.at>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
HMPF!
The test in the original post failed for the wrong reason. :-/
-- Hannes
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 ad8cc7d..06fc2bf 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -110,4 +110,16 @@ test_expect_success 'check correct prefix detection' '
git add 1/2/a 1/3/b 1/2/c
'
+test_expect_success 'git add removes unmerged entries' '
+ git rm --cached -f file || : ignore failure &&
+ for s in 0 1 2 3
+ do
+ echo "100644 0123456789012345678901234567890123456789 $s file"
+ done | git update-index --index-info &&
+ echo new > file &&
+ git add file &&
+ git ls-files --stage | grep "^100644 .* 0 file$" &&
+ ! git ls-files --stage | grep "^100644 .* [^0] file$"
+'
+
test_done
--
1.5.2.2.555.g24e57
next prev parent reply other threads:[~2007-07-02 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 11:18 [PATCH] Test that git add removes stages 1,2,3 Johannes Sixt
2007-07-02 11:23 ` Johannes Sixt [this message]
2007-07-02 11:34 ` Johannes Schindelin
2007-07-02 11:47 ` Johannes Sixt
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=1183375431711-git-send-email-johannes.sixt@telecom.at \
--to=johannes.sixt@telecom.at \
--cc=git@vger.kernel.org \
--cc=j.sixt@eudaptics.com \
/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).