Skip to content

Commit

Permalink
git-clone: honor "--" to end argument parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
  • Loading branch information
Heikki Orsila authored and Junio C Hamano committed Nov 4, 2007
1 parent aa807bc commit 19391c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/git-clone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SYNOPSIS
'git-clone' [--template=<template_directory>]
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare]
[-o <name>] [-u <upload-pack>] [--reference <repository>]
[--depth <depth>] <repository> [<directory>]
[--depth <depth>] [--] <repository> [<directory>]

DESCRIPTION
-----------
Expand Down
5 changes: 4 additions & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ die() {
}

usage() {
die "Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] <repo> [<dir>]"
die "Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] [--] <repo> [<dir>]"
}

get_repo_base() {
Expand Down Expand Up @@ -160,6 +160,9 @@ while
*,--depth)
shift
depth="--depth=$1";;
*,--)
shift
break ;;
*,-*) usage ;;
*) break ;;
esac
Expand Down

0 comments on commit 19391c3

Please sign in to comment.