1
0
mirror of https://github.com/git/git.git synced 2024-10-21 22:18:12 +02:00
git/builtin
Junio C Hamano 15fabd1bbd builtin/grep.c: make configuration callback more reusable
The grep_config() function takes one instance of grep_opt as its
callback parameter, and populates it by running git_config().

This has three practical implications:

 - You have to have an instance of grep_opt already when you call
   the configuration, but that is not necessarily always true.  You
   may be trying to initialize the grep_filter member of rev_info,
   but are not ready to call init_revisions() on it yet.

 - It is not easy to enhance grep_config() in such a way to make it
   cascade to other callback functions to grab other variables in
   one call of git_config(); grep_config() can be cascaded into from
   other callbacks, but it has to be at the leaf level of a cascade.

 - If you ever need to use more than one instance of grep_opt, you
   will have to open and read the configuration file(s) every time
   you initialize them.

Rearrange the configuration mechanism and model it after how diff
configuration variables are handled.  An early call to git_config()
reads and remembers the values taken from the configuration in the
default "template", and a separate call to grep_init() uses this
template to instantiate a grep_opt.

The next step will be to move some of this out of this file so that
the other user of the grep machinery (i.e. "log") can use it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-09 16:04:12 -07:00
..
add.c Merge branch 'rj/path-cleanup' 2012-09-14 11:53:53 -07:00
annotate.c
apply.c Merge branch 'maint-1.7.11' into maint 2012-09-12 14:08:05 -07:00
archive.c Reduce translations by using same terminologies 2012-08-22 12:02:28 -07:00
bisect--helper.c i18n: bisect--helper: mark parseopt strings for translation 2012-08-20 12:23:15 -07:00
blame.c Merge branch 'jc/maint-blame-no-such-path' 2012-09-17 15:52:32 -07:00
branch.c Merge branch 'rj/path-cleanup' 2012-09-14 11:53:53 -07:00
bundle.c
cat-file.c Merge branch 'maint-1.7.11' into maint 2012-09-10 15:31:06 -07:00
check-attr.c Merge branch 'maint' 2012-09-17 15:59:34 -07:00
check-ref-format.c
checkout-index.c Use imperative form in help usage to describe an action 2012-08-22 12:02:28 -07:00
checkout.c Merge branch 'nd/checkout-option-parsing-fix' 2012-09-14 11:54:34 -07:00
clean.c i18n: clean: mark parseopt strings for translation 2012-08-20 12:23:16 -07:00
clone.c Merge branch 'rt/maint-clone-single' 2012-10-01 12:58:10 -07:00
column.c i18n: column: mark parseopt strings for translation 2012-08-20 12:23:16 -07:00
commit-tree.c Merge branch 'kk/maint-commit-tree' 2012-07-23 20:55:54 -07:00
commit.c Merge branch 'os/commit-submodule-ignore' 2012-10-01 12:58:52 -07:00
config.c Merge branch 'jk/config-warn-on-inaccessible-paths' into maint 2012-09-18 14:24:06 -07:00
count-objects.c i18n: count-objects: mark parseopt strings for translation 2012-08-20 12:23:16 -07:00
credential.c
describe.c i18n: describe: mark parseopt strings for translation 2012-08-20 12:23:16 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c Merge branch 'tr/void-diff-setup-done' into maint-1.7.11 2012-09-11 10:53:40 -07:00
fast-export.c i18n: fast-export: mark parseopt strings for translation 2012-08-20 12:23:16 -07:00
fetch-pack.c fetch-pack: eliminate spurious error messages 2012-09-12 11:46:32 -07:00
fetch.c Merge branch 'nd/fetch-status-alignment' 2012-09-18 14:35:55 -07:00
fmt-merge-msg.c i18n: fmt-merge-msg: mark parseopt strings for translation 2012-08-20 12:23:17 -07:00
for-each-ref.c Merge branch 'nd/i18n-parseopt-help' 2012-09-07 11:09:09 -07:00
fsck.c i18n: fsck: mark parseopt strings for translation 2012-08-20 12:23:17 -07:00
gc.c silence git gc --auto --quiet output 2012-09-27 17:57:26 -07:00
grep.c builtin/grep.c: make configuration callback more reusable 2012-10-09 16:04:12 -07:00
hash-object.c i18n: hash-object: mark parseopt strings for translation 2012-08-20 12:23:17 -07:00
help.c i18n: help: mark parseopt strings for translation 2012-08-20 12:23:17 -07:00
index-pack.c i18n: mark more index-pack strings for translation 2012-08-31 13:05:05 -07:00
init-db.c i18n: init-db: mark parseopt strings for translation 2012-08-20 12:23:17 -07:00
log.c Merge branch 'mz/cherry-pick-cmdline-order' into maint 2012-09-14 21:24:18 -07:00
ls-files.c i18n: ls-files: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
ls-remote.c ls-remote: document the '--get-url' option 2012-09-07 10:58:35 -07:00
ls-tree.c i18n: ls-tree: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
mailinfo.c Merge branch 'lt/mailinfo-handle-attachment-more-sanely' 2012-10-02 21:13:35 -07:00
mailsplit.c
merge-base.c Merge branch 'jc/merge-bases' 2012-09-11 11:36:05 -07:00
merge-file.c i18n: merge-file: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'tr/void-diff-setup-done' into maint-1.7.11 2012-09-11 10:53:40 -07:00
mktag.c
mktree.c i18n: mktree: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
mv.c i18n: mv: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
name-rev.c i18n: name-rev: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
notes.c builtin/notes.c: mark file-scope private symbols as static 2012-09-15 22:58:20 -07:00
pack-objects.c i18n: pack-objects: mark parseopt strings for translation 2012-08-20 12:23:18 -07:00
pack-redundant.c
pack-refs.c i18n: pack-refs: mark parseopt strings for translation 2012-08-20 12:23:19 -07:00
patch-id.c
prune-packed.c i18n: prune-packed: mark parseopt strings for translation 2012-08-20 12:23:19 -07:00
prune.c Merge branch 'rj/path-cleanup' 2012-09-14 11:53:53 -07:00
push.c Merge branch 'nd/i18n-parseopt-help' 2012-09-07 11:09:09 -07:00
read-tree.c i18n: read-tree: mark parseopt strings for translation 2012-08-20 12:23:19 -07:00
receive-pack.c Merge branch 'jk/receive-pack-unpack-error-to-pusher' 2012-10-01 12:58:34 -07:00
reflog.c
remote-ext.c
remote-fd.c
remote.c Merge branch 'nd/maint-remote-remove' 2012-09-12 14:21:58 -07:00
replace.c i18n: replace: mark parseopt strings for translation 2012-08-20 12:23:19 -07:00
rerere.c i18n: rerere: mark parseopt strings for translation 2012-08-20 12:23:19 -07:00
reset.c i18n: reset: mark parseopt strings for translation 2012-08-20 12:23:19 -07:00
rev-list.c
rev-parse.c Merge branch 'maint-1.7.11' into maint 2012-09-12 14:08:05 -07:00
revert.c Merge branch 'mz/cherry-pick-cmdline-order' 2012-09-10 15:42:55 -07:00
rm.c i18n: rm: mark parseopt strings for translation 2012-08-20 12:23:20 -07:00
send-pack.c do not send client agent unless server does first 2012-08-10 12:35:13 -07:00
shortlog.c i18n: shortlog: mark parseopt strings for translation 2012-08-20 12:23:20 -07:00
show-branch.c i18n: show-branch: mark parseopt strings for translation 2012-08-22 10:58:28 -07:00
show-ref.c i18n: show-ref: mark parseopt strings for translation 2012-08-22 10:58:28 -07:00
stripspace.c
symbolic-ref.c i18n: symbolic-ref: mark parseopt strings for translation 2012-08-22 10:58:28 -07:00
tag.c Reduce translations by using same terminologies 2012-08-22 12:02:28 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c i18n: update-index: mark parseopt strings for translation 2012-08-22 10:58:29 -07:00
update-ref.c Use imperative form in help usage to describe an action 2012-08-22 12:02:28 -07:00
update-server-info.c i18n: update-server-info: mark parseopt strings for translation 2012-08-22 10:58:29 -07:00
upload-archive.c
var.c
verify-pack.c i18n: verify-pack: mark parseopt strings for translation 2012-08-22 10:58:29 -07:00
verify-tag.c i18n: verify-tag: mark parseopt strings for translation 2012-08-22 10:58:29 -07:00
write-tree.c i18n: write-tree: mark parseopt strings for translation 2012-08-22 10:58:29 -07:00