Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 09:59:33 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-08 09:59:33 +0300
commit3915f9a4fa2ae48b282a71f72113ca8629b27618 (patch)
treec273799cdec3a91d09c93db595311b9ca1975ea3 /t/t5304-prune.sh
parentad3207e6ff019060e4f634a5455aa0ae248e3a7a (diff)
parent8ab5aa4bd8e218b9658dbdd7f5bfcaa512f607dc (diff)
Merge branch 'jc/parseopt-expiry-errors'
"git gc --prune=nonsense" spent long time repacking and then silently failed when underlying "git prune --expire=nonsense" failed to parse its command line. This has been corrected. * jc/parseopt-expiry-errors: parseopt: handle malformed --expire arguments more nicely gc: do not upcase error message shown with die()
Diffstat (limited to 't/t5304-prune.sh')
-rwxr-xr-xt/t5304-prune.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index f0f6e2a5f3..f20f03c103 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -320,4 +320,14 @@ test_expect_success 'prune: handle HEAD reflog in multiple worktrees' '
test_cmp expected actual
'
+test_expect_success 'prune: handle expire option correctly' '
+ test_must_fail git prune --expire 2>error &&
+ test_i18ngrep "requires a value" error &&
+
+ test_must_fail git prune --expire=nyah 2>error &&
+ test_i18ngrep "malformed expiration" error &&
+
+ git prune --no-expire
+'
+
test_done