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:
authorJeff King <peff@peff.net>2018-11-05 09:44:27 +0300
committerJunio C Hamano <gitster@pobox.com>2018-11-06 06:56:14 +0300
commit0a8a16ade6b3a55114cd0f28e5e71c2a3483d825 (patch)
tree5b524fa4889bb33c2a014d2a4f2cf4ccaf92c8bb /t/t0040-parse-options.sh
parent735ca208c5463ebbb0991ed02f41b1e30f9dddc1 (diff)
parse-options: drop OPT_DATE()
There are no users of OPT_DATE except for test-parse-options; its only caller went away in 27ec394a97 (prune: introduce OPT_EXPIRY_DATE() and use it, 2013-04-25). It also has a bug: it does not specify PARSE_OPT_NONEG, but its callback does not respect the "unset" flag, and will feed NULL to approxidate() and segfault. Probably this should be marked with NONEG, or the callback should set the timestamp to some sentinel value (e.g,. "0", or "(time_t)-1"). But since there are no callers, deleting it means we don't even have to think about what the right behavior should be. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-xt/t0040-parse-options.sh22
1 files changed, 0 insertions, 22 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 17d0c18feb..f5b10861c4 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -23,7 +23,6 @@ usage: test-tool parse-options <options>
-j <n> get a integer, too
-m, --magnitude <n> get a magnitude
--set23 set integer to 23
- -t <time> get timestamp of <time>
-L, --length <str> get length of <str>
-F, --file <file> set file to <file>
@@ -246,27 +245,6 @@ test_expect_success 'keep some options as arguments' '
'
cat >expect <<\EOF
-boolean: 0
-integer: 0
-magnitude: 0
-timestamp: 1
-string: (not set)
-abbrev: 7
-verbose: -1
-quiet: 1
-dry run: no
-file: (not set)
-arg 00: foo
-EOF
-
-test_expect_success 'OPT_DATE() works' '
- test-tool parse-options -t "1970-01-01 00:00:01 +0000" \
- foo -q >output 2>output.err &&
- test_must_be_empty output.err &&
- test_cmp expect output
-'
-
-cat >expect <<\EOF
Callback: "four", 0
boolean: 5
integer: 4