summaryrefslogtreecommitdiff
path: root/builtin/checkout-index.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-08-03 11:51:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-07 15:30:55 (GMT)
commitc83e8c1768b1dbce98a3161aec175a42858d4795 (patch)
tree8aac614d590a04ab661558614f1556f6fc9e2e7b /builtin/checkout-index.c
parent05efb7b7575dd60a5997a0f7616d0cc222c5dbf8 (diff)
downloadgit-c83e8c1768b1dbce98a3161aec175a42858d4795.zip
git-c83e8c1768b1dbce98a3161aec175a42858d4795.tar.gz
git-c83e8c1768b1dbce98a3161aec175a42858d4795.tar.bz2
hash-object: replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP
This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27). hash-object is a plumbing layer command, so better not change the input/output behavior for now. Unfortunately we have these lines relying on the count up mechanism of OPT_BOOLEAN: if (hashstdin > 1) errstr = "Multiple --stdin arguments are not supported"; Using OPT_BOOL will make "git hash-object --stdin --stdin" the same as "git hash-object --stdin", resulting in just one object, which will surprise users with an expectation to see two objects hashed. Because it is not good to silently succeed and give an unexpected result, even when the expectation is unrealistic, we use COUNTUP to explicitly catch such an error. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout-index.c')
0 files changed, 0 insertions, 0 deletions