Code

Merge branch 'ph/parseopt-sh'
authorJunio C Hamano <gitster@pobox.com>
Sun, 18 Nov 2007 05:39:37 +0000 (21:39 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Nov 2007 05:39:37 +0000 (21:39 -0800)
* 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.

12 files changed:
1  2 
git-bisect.sh
git-clean.sh
git-commit.sh
git-instaweb.sh
git-lost-found.sh
git-merge.sh
git-rebase--interactive.sh
git-rebase.sh
git-request-pull.sh
git-stash.sh
git-submodule.sh
git.c

diff --cc git-bisect.sh
Simple merge
diff --cc git-clean.sh
index ad68595fbf313c1cab7de565e6d44f2c87aff384,35a5142c56f8d6f9007fcde840bf0d90b1d02a3a..01c95e9fe8a19afcf331ed5ffd47eea478886213
@@@ -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-commit.sh
Simple merge
diff --cc git-instaweb.sh
Simple merge
index f2ec5d147a56136b8c3aff8b693912a7c792da63,a5a32e7c70f33369a016dd18ebb072c90b3a40f7..9cedaf80ceac1d4100adf3cfb152c76c7f945e4d
@@@ -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-merge.sh
Simple merge
Simple merge
diff --cc git-rebase.sh
Simple merge
Simple merge
diff --cc git-stash.sh
Simple merge
Simple merge
diff --cc git.c
index 4a250f7e8b84f2334c84daaf93baa0fe1f0ca344,b843da4d424d23d2855d84f55eef52e8a3fa1bb7..7604319b5a9e8c12b2f00b4d5e6480445e02daa6
--- 1/git.c
--- 2/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 },