git/builtin
Jonathan Nieder 309be813c9 update-index: migrate to parse-options API
--refresh and --really-refresh accept flags (like -q) and modify
an error indicator.  It might make sense to make the error
indicator global, but just pass the flags and a pointer to the error
indicator in a struct instead.

--cacheinfo wants 3 arguments.  Use the OPTION_LOWLEVEL_CALLBACK
extension to grab them and PARSE_OPT_NOARG to disallow the "sticked"
--cacheinfo=foo form.  (The resulting message

	$ git update-index --cacheinfo=foo
	error: option `cacheinfo' takes no value

is unfortunately incorrect.)

--assume-unchanged and --no-assume-unchanged probably should use the
OPT_UYN feature; but use a callback for now so the existing MARK_FLAG
and UNMARK_FLAG values can be used.

--stdin and --index-info are still constrained to be the last argument
(implemented using the OPTION_LOWLEVEL_CALLBACK extension).

--unresolve and --again consume all arguments that come after them
(also using OPTION_LOWLEVEL_CALLBACK).

The order of options matters.  Each path on the command line is
affected only by the options that come before it.  A custom
argument-parsing loop with parse_options_step() brings that about.

In exchange for all the fuss, we get the usual perks: support for
un-sticked options, better usage error messages, more useful -h
output, and argument parsing code that should be easier to tweak
in the future.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07 14:19:32 -08:00
..
add.c git add: Add the "--ignore-missing" option for the dry run 2010-07-12 15:13:54 -07:00
annotate.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
apply.c apply: don't segfault on binary files with missing data 2010-10-29 14:13:33 -07:00
archive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
bisect--helper.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
blame.c parse-options: Don't call parse_options_check() so much 2010-12-06 16:51:36 -08:00
branch.c Merge branch 'sm/branch-broken-ref' 2010-06-21 06:02:47 -07:00
bundle.c Use angles for placeholders consistently 2010-10-08 12:29:52 -07:00
cat-file.c Merge branch 'cp/textconv-cat-file' 2010-06-27 12:07:55 -07:00
check-attr.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
check-ref-format.c Allow "check-ref-format --branch" from subdirectory 2010-08-06 10:01:45 -07:00
checkout-index.c Fix {update,checkout}-index usage strings 2010-10-08 12:31:08 -07:00
checkout.c Improvements to `git checkout -h` 2010-09-27 10:54:17 -07:00
clean.c clean: remove redundant variable baselen 2010-11-17 13:26:38 -08:00
clone.c clone: warn users --depth is ignored in local clones 2010-08-24 09:28:02 -07:00
commit-tree.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
commit.c Merge branch 'jn/fix-abbrev' into maint 2010-08-20 12:53:09 -07:00
config.c Merge branch 'jn/paginate-fix' 2010-08-31 16:23:31 -07:00
count-objects.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
describe.c Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint 2010-06-16 16:21:15 -07:00
diff-files.c Submodules: Use "ignore" settings from .gitmodules too for diff and status 2010-08-09 09:11:44 -07:00
diff-index.c Submodules: Use "ignore" settings from .gitmodules too for diff and status 2010-08-09 09:11:44 -07:00
diff-tree.c Submodules: Use "ignore" settings from .gitmodules too for diff and status 2010-08-09 09:11:44 -07:00
diff.c Submodules: Use "ignore" settings from .gitmodules too for diff and status 2010-08-09 09:11:44 -07:00
fast-export.c Merge branch 'en/d-f-conflict-fix' 2010-09-08 08:54:01 -07:00
fetch-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
fetch.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
fmt-merge-msg.c Merge branch 'jn/update-contrib-example-merge' 2010-09-03 09:43:42 -07:00
for-each-ref.c for-each-ref: fix objectname:short bug 2010-08-26 16:42:25 -07:00
fsck.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
gc.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
grep.c Use angles for placeholders consistently 2010-10-08 12:29:52 -07:00
hash-object.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
help.c Cast execl*() NULL sentinels to (char *) 2010-07-25 23:14:18 -07:00
index-pack.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
init-db.c init: plug tiny one-time memory leak 2010-10-06 10:46:05 -07:00
log.c Fix 'git log' early pager startup error case 2010-08-25 12:11:59 -07:00
ls-files.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
ls-remote.c ls-remote: run setup_git_directory_gently() sooner 2010-08-15 20:00:02 -07:00
ls-tree.c Use angles for placeholders consistently 2010-10-08 12:29:52 -07:00
mailinfo.c enums: omit trailing comma for portability 2010-05-31 16:59:27 -07:00
mailsplit.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
merge-base.c merge-base --independent to print reduced parent list in a merge 2010-08-18 14:02:03 -07:00
merge-file.c merge-file: run setup_git_directory_gently() sooner 2010-08-15 20:00:03 -07:00
merge-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-ours.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-recursive.c Merge branch 'jn/merge-renormalize' 2010-09-03 09:43:41 -07:00
merge-tree.c merge-tree: fix where two branches share no changes 2010-07-14 12:56:49 -07:00
merge.c Merge branch 'dg/local-mod-error-messages' 2010-09-03 22:23:49 -07:00
mktag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
mktree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
mv.c string_list: Add STRING_LIST_INIT macro and make use of it. 2010-07-05 11:47:57 -07:00
name-rev.c object.h: Add OBJECT_ARRAY_INIT macro and make use of it. 2010-08-29 22:42:49 -07:00
notes.c notes: Don't create (empty) commit when removing non-existing notes 2010-08-31 11:07:34 -07:00
pack-objects.c Put a space between `<' and argument in pack-objects usage string 2010-10-08 12:31:08 -07:00
pack-redundant.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
pack-refs.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
patch-id.c patch-id: Add support for mbox format 2010-04-19 13:01:49 -07:00
prune-packed.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
prune.c prune: allow --dry-run for -n and --verbose for -v 2010-08-09 10:13:18 -07:00
push.c Merge branch 'maint' 2010-08-12 18:07:09 -07:00
read-tree.c Merge remote branch 'ko/master' into jc/read-tree-cache-tree-fix 2010-07-08 18:55:50 -07:00
receive-pack.c Merge branch 'tr/receive-pack-aliased-update-fix' into maint 2010-07-07 10:25:15 -07:00
reflog.c Merge branch 'jc/maint-no-reflog-expire-unreach-for-head' 2010-05-21 04:02:18 -07:00
remote.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
replace.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
rerere.c Merge branch 'jn/merge-renormalize' 2010-09-03 09:43:41 -07:00
reset.c reset: suggest what to do upon "git reset --mixed <paths>" 2010-08-21 23:17:35 -07:00
rev-list.c Merge branch 'jk/maint-rev-list-nul' into maint 2010-11-24 12:46:32 -08:00
rev-parse.c Merge branch 'maint' 2010-07-07 11:18:26 -07:00
revert.c builtin/revert.c: don't dereference a NULL pointer 2010-09-27 10:39:54 -07:00
rm.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
send-pack.c send-pack: avoid redundant "pack-objects died with strange error" 2010-10-18 16:12:09 -07:00
shortlog.c parse-options: Don't call parse_options_check() so much 2010-12-06 16:51:36 -08:00
show-branch.c Use parentheses and `...' where appropriate 2010-10-08 12:31:07 -07:00
show-ref.c string_list: Add STRING_LIST_INIT macro and make use of it. 2010-07-05 11:47:57 -07:00
stripspace.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
symbolic-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
tag.c tag -v: use RUN_GIT_CMD to run verify-tag 2010-04-17 12:40:19 -07:00
tar-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-file.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-objects.c do not depend on signed integer overflow 2010-10-06 11:10:07 -07:00
update-index.c update-index: migrate to parse-options API 2010-12-07 14:19:32 -08:00
update-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-server-info.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
upload-archive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
var.c var: run setup_git_directory_gently() sooner 2010-08-15 20:00:02 -07:00
verify-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
verify-tag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
write-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00