summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 587ac8c)
raw | patch | inline | side by side (parent: 587ac8c)
author | Conrad Irwin <conrad.irwin@gmail.com> | |
Sat, 7 May 2011 06:00:00 +0000 (23:00 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 10 May 2011 00:02:33 +0000 (17:02 -0700) |
Make git commit --interactive feel more like git add --interactive by
allowing the user to restrict the list of files they have to deal with.
A test in t7501 used to ensure that this is not allowed; no need for that
anymore.
Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
allowing the user to restrict the list of files they have to deal with.
A test in t7501 used to ensure that this is not allowed; no need for that
anymore.
Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c | patch | blob | history | |
t/t7501-commit.sh | patch | blob | history |
diff --git a/builtin/commit.c b/builtin/commit.c
index 636aea6d6259b6151670fa6259b2eb59509a80b2..7707af884494cfe68d9c781efb7ef4c532614874 100644 (file)
--- a/builtin/commit.c
+++ b/builtin/commit.c
if (all && argc > 0)
die(_("Paths with -a does not make sense."));
- else if (interactive && argc > 0)
- die(_("Paths with --interactive does not make sense."));
if (null_termination && status_format == STATUS_FORMAT_LONG)
status_format = STATUS_FORMAT_PORCELAIN;
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 3d2b14d3035e02e14696f64edd0ddabca204f576..c2fd116d633351eeaa75cc4040f6e4a73670975b 100755 (executable)
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
"echo King of the bongo >file &&
test_must_fail git commit -m foo -a file"
-test_expect_success PERL 'cannot use paths with --interactive' '
+test_expect_success PERL 'can use paths with --interactive' '
echo bong-o-bong >file &&
# 2: update, 1:st path, that is all, 7: quit
( echo 2; echo 1; echo; echo 7 ) |
- test_must_fail git commit -m foo --interactive file
+ git commit -m foo --interactive file &&
+ git reset --hard HEAD^
'
test_expect_success \