From: Junio C Hamano Date: Sun, 18 Nov 2007 05:39:37 +0000 (-0800) Subject: Merge branch 'ph/parseopt-sh' X-Git-Tag: v1.5.4-rc0~190 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f4c4eb0e16d1e21eaaf5cab5591c3491456cd14;p=git.git Merge branch 'ph/parseopt-sh' * ph/parseopt-sh: git-quiltimport.sh fix --patches handling git-am: -i does not take a string parameter. sh-setup: don't let eval output to be shell-expanded. git-sh-setup: fix parseopt `eval` string underquoting Give git-am back the ability to add Signed-off-by lines. git-rev-parse --parseopt scripts: Add placeholders for OPTIONS_SPEC Migrate git-repack.sh to use git-rev-parse --parseopt Migrate git-quiltimport.sh to use git-rev-parse --parseopt Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdash Migrate git-instaweb.sh to use git-rev-parse --parseopt Migrate git-merge.sh to use git-rev-parse --parseopt Migrate git-am.sh to use git-rev-parse --parseopt Migrate git-clone to use git-rev-parse --parseopt Migrate git-clean.sh to use git-rev-parse --parseopt. Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts. --- 9f4c4eb0e16d1e21eaaf5cab5591c3491456cd14 diff --cc git-clean.sh index ad68595fb,35a5142c5..01c95e9fe --- a/git-clean.sh +++ b/git-clean.sh @@@ -65,21 -68,13 +69,21 @@@ d shift done -if [ "$disabled" = true ]; then +# requireForce used to default to false but now it defaults to true. +# IOW, lack of explicit "clean.requireForce = false" is taken as +# "clean.requireForce = true". +case "$disabled" in +"") + die "clean.requireForce not set and -n or -f not given; refusing to clean" + ;; +"true") die "clean.requireForce set and -n or -f not given; refusing to clean" -fi + ;; +esac - case "$ignored,$ignoredonly" in - 1,1) usage;; - esac + if [ "$ignored,$ignoredonly" = "1,1" ]; then + die "-x and -X cannot be set together" + fi if [ -z "$ignored" ]; then excl="--exclude-per-directory=.gitignore" diff --cc git-lost-found.sh index f2ec5d147,a5a32e7c7..9cedaf80c --- a/git-lost-found.sh +++ b/git-lost-found.sh @@@ -2,10 -2,9 +2,11 @@@ USAGE='' SUBDIRECTORY_OK='Yes' + OPTIONS_SPEC= . git-sh-setup +echo "WARNING: '$0' is deprecated in favor of 'git fsck --lost-found'" >&2 + if [ "$#" != "0" ] then usage diff --cc git.c index 4a250f7e8,b843da4d4..7604319b5 --- a/git.c +++ b/git.c @@@ -338,9 -343,9 +338,9 @@@ static void handle_internal_command(in { "rerere", cmd_rerere, RUN_SETUP }, { "reset", cmd_reset, RUN_SETUP }, { "rev-list", cmd_rev_list, RUN_SETUP }, - { "rev-parse", cmd_rev_parse, RUN_SETUP }, + { "rev-parse", cmd_rev_parse }, { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, - { "rm", cmd_rm, RUN_SETUP | NEED_WORK_TREE }, + { "rm", cmd_rm, RUN_SETUP }, { "runstatus", cmd_runstatus, RUN_SETUP | NEED_WORK_TREE }, { "shortlog", cmd_shortlog, RUN_SETUP | USE_PAGER }, { "show-branch", cmd_show_branch, RUN_SETUP },