summaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorLibravatar Sean Barag <sean@barag.org>2020-10-01 03:46:14 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-09-30 22:09:13 -0700
commitebe7e28a3600f4e67e9a1781e335adb36f3f139b (patch)
treebe7d176ae2a3e0c06db9aaf6436d6a126be74530 /blob.c
parentrefs: consolidate remote name validation (diff)
downloadtgif-ebe7e28a3600f4e67e9a1781e335adb36f3f139b.tar.xz
clone: validate --origin option before use
Providing a bad origin name to `git clone` currently reports an 'invalid refspec' error instead of a more explicit message explaining that the `--origin` option was malformed. This behavior dates back to since 8434c2f1 (Build in clone, 2008-04-27). Reintroduce validation for the provided `--origin` option, but notably _don't_ include a multi-level check (e.g. "foo/bar") that was present in the original `git-clone.sh`. `git remote` allows multi-level remote names since at least 46220ca100 (remote.c: Fix overtight refspec validation, 2008-03-20), so that appears to be the desired behavior. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Derrick Stolee <stolee@gmail.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Sean Barag <sean@barag.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blob.c')
0 files changed, 0 insertions, 0 deletions