summaryrefslogtreecommitdiff
path: root/Documentation
Commit message (Collapse)AuthorAgeFilesLines
* unpack_trees: group error messages by typeMatthieu Moy2010-08-111-0/+2
| | | | | | | | | | | | | | | | | When an error is encountered, it calls add_rejected_file() which either - directly displays the error message and stops if in plumbing mode (i.e. if show_all_errors is not initialized at 1) - or stores it so that it will be displayed at the end with display_error_msgs(), Storing the files by error type permits to have a list of files for which there is the same error instead of having a serie of almost identical errors. As each bind_overlap error combines a file and an old file, a list cannot be done, therefore, theses errors are not stored but directly displayed. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.2v1.7.2Junio C Hamano2010-07-212-8/+9
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2010-07-191-0/+10
|\ | | | | | | | | | | * maint: update-server-info: Shorten read_pack_info_file() Documentation: Explain git-mergetool's use of temporary files
| * Documentation: Explain git-mergetool's use of temporary filesDavid Aguilar2010-07-191-0/+10
| | | | | | | | | | | | | | | | 'git mergetool' creates '*.orig' backup files in its default configuration. Mention this in its documentation. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git add: Add --ignore-missing to SYNOPSISÆvar Arnfjörð Bjarmason2010-07-191-1/+2
| | | | | | | | | | | | | | | | | | All the git add options were listed in the synopsis until the --ignore-missing option was added. Change that so that the git add documentation now has the complete listing. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git submodule add: Remove old docs about implicit -fÆvar Arnfjörð Bjarmason2010-07-191-4/+0
| | | | | | | | | | | | | | | | | | git submodule add no longer implicitly adds with --force. Remove references to the old functionality in the documentation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git submodule add: Require the new --force option to add ignored pathsJens Lehmann2010-07-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | To make the behavior of "git submodule add" more consistent with "git add" ignored submodule paths should not be silently added when they match an entry in a .gitignore file. To be able to override that default behavior in the same way as we can do that for "git add", the new option "--force" is introduced. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jl/add-n-ignore-missing'Junio C Hamano2010-07-191-1/+8
|\ \ | | | | | | | | | | | | * jl/add-n-ignore-missing: git add: Add the "--ignore-missing" option for the dry run
| * | git add: Add the "--ignore-missing" option for the dry runJens Lehmann2010-07-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is useful to know if a file or directory will be ignored before it is added to the work tree. An example is "git submodule add", where it would be really nice to be able to fail with an appropriate error message before the submodule is cloned and checked out. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'eb/doc-log-manpage'Junio C Hamano2010-07-151-6/+9
|\ \ \ | | | | | | | | | | | | | | | | * eb/doc-log-manpage: Reorganize `git-log' man page to clarify common diff options.
| * | | Reorganize `git-log' man page to clarify common diff options.Eli Barzilay2010-07-081-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will reduce considerably the common confusion where people miss the `--follow' option, and wonder why `-M'/`-C' is not working. * Move the diff options include to after the log-specific flags, and add a "Common diff options" subtitle before them. (These options apply only when patches are shown, which is not a common use case among newbies, so having them first is confusing.) * Move the `--follow' description to the top of the listed options. The options before that seem less important: `--full-diff' applies only when patches are shown, `--source' and `--decorate' are less useful with many common commit specifications. * Clarify that `--follow' works only for a single path argument. Signed-off-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'mg/revision-doc'Junio C Hamano2010-07-1520-222/+257
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mg/revision-doc: Documentation: link to gitrevisions rather than git-rev-parse Documentation: gitrevisions Documentation: split off rev doc into include file
| * | | | Documentation: link to gitrevisions rather than git-rev-parseMichael J Gruber2010-07-0516-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, whenever we need documentation for revisions and ranges, we link to the git-rev-parse man page, i.e. a plumbing man page, which has this along with the documentation of all rev-parse modes. Link to the new gitrevisions man page instead in all cases except - when the actual git-rev-parse command is referred to or - in very technical context (git-send-pack). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Documentation: gitrevisionsMichael J Gruber2010-07-052-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new man page gitrevisions(7) which contains the revsions and ranges documentation but not more. This uses (per include) the same bits as the pertaining section of git-rev-parse(1). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Documentation: split off rev doc into include fileMichael J Gruber2010-07-052-199/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the documentation for revisions and ranges sits in the git-rev-parse man page, i.e. a plumbing man page, along with the documentation of all rev-parse modes. Split off the revisions and ranges section into an included file to prepare for restructuring. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ab/submodule-add-f'Junio C Hamano2010-07-151-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * ab/submodule-add-f: git submodule: add submodules with git add -f <path>
| * | | | | git submodule: add submodules with git add -f <path>Ævar Arnfjörð Bjarmason2010-07-051-0/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `git submodule add' to add the new submodule <path> with `git add --force'. I keep my /etc in .git with a .gitignore that contains just "*". I.e. `git status' will ignore everything that isn't in the tree already. When I do: git submodule add <url> hlagh git-submodule will get as far as checking out the remote repository into hlagh, but it'll die right afterwards when it fails to add the new path: The following paths are ignored by one of your .gitignore files: hlagh Use -f if you really want to add them. fatal: no files added Failed to add submodule 'hlagh' Currently there's no way to add a submodule in this situation other than to remove the ignored path from the .gitignore while I'm at it. That's silly, when you run `git submodule add' you're explicitly saying that you want to add something *new* to the repository. Instead it should just add the path with `git add --force'. Initially I implemented this by adding new -f and --force options to `git submodule add'. But if the --force option isn't supplied it'll get as far as cloning `hlagh', but won't add it. So the first thing the user has to do is to remove `hlagh' and then try again with the --force option. That sucks, it should just add the path to begin with. I can't think of any usecase where you've gone through the trouble of typing out `git submodule add ..', but wish to be overriden by a `gitignore'. The submodule semantics should be more like `git init', not `git add'. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2010-07-152-0/+12
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | * maint: Documentation: add submodule.* to the big configuration variable list gitmodules.5: url can be a relative path gitweb: fix esc_url
| * | | | Documentation: add submodule.* to the big configuration variable listJonathan Nieder2010-07-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The url, path, and the update items in [submodule "foo"] stanzas are nicely explained in the .gitmodules and ‘git submodule’ documentation. Point there from the config documentation. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | gitmodules.5: url can be a relative pathJonathan Nieder2010-07-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is already excellent documentation for this facility in git-submodule.1, but it is not so discoverable. Relative paths in .gitmodules can be useful for serving the same repository over multiple protocols, for example. Thanks to Peter for pointing this out. Cc: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Git 1.7.2-rc3v1.7.2-rc3Junio C Hamano2010-07-141-1/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2010-07-132-2/+5
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | | | | | * maint: git fetch documentation: describe short '-p' synonym to '--prune' option format-patch: document the format.to configuration setting
| * | | git fetch documentation: describe short '-p' synonym to '--prune' optionOren Held2010-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's already implemented, just undocumented. Signed-off-by: Oren Held <orenhe@il.ibm.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | format-patch: document the format.to configuration settingMiklos Vajna2010-07-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [jc: with simplification from Jonathan Nieder] Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2010-07-112-2/+2
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | * maint: Documentation: Spelling fix in protocol-capabilities.txt checkout: accord documentation to what git does t0005: work around strange $? in ksh when program terminated by a signal
| * | Documentation: Spelling fix in protocol-capabilities.txtFredrik Skolmli2010-07-091-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Skolmli <fredrik@frsk.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | checkout: accord documentation to what git doesNicolas Sebrecht2010-07-091-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.7.2-rc2v1.7.2-rc2Junio C Hamano2010-07-071-14/+4
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2010-07-071-0/+19
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: backmerge a few more fixes to 1.7.1.X series rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option fix git branch -m in presence of cross devices Conflicts: RelNotes builtin/rev-parse.c
| * | backmerge a few more fixes to 1.7.1.X seriesJunio C Hamano2010-07-071-0/+19
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'mg/doc-rev-parse-treepath-syntax' into maintJunio C Hamano2010-07-071-6/+9
| |\ \ | | | | | | | | | | | | | | | | | | | | * mg/doc-rev-parse-treepath-syntax: git-rev-parse.txt: Add more examples for caret and colon git-rev-parse.txt: Document ":path" specifier
* | \ \ Merge branch 'maint'Junio C Hamano2010-07-052-1/+13
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | * maint: t0006: test timezone parsing rerere.txt: Document forget subcommand Documentation/git-gc.txt: add reference to githooks
| * | | rerere.txt: Document forget subcommandMichael J Gruber2010-07-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dea4562 (rerere forget path: forget recorded resolution, 2009-12-25) introduced the forget subcommand for rerere. Document it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation/git-gc.txt: add reference to githooksChris Packham2010-07-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This advertises the existence of the 'pre-auto-gc' hook and adds a cross reference to where the hook is documented. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Updates from the list to 1.7.2 Release NotesJunio C Hamano2010-07-021-12/+14
| |_|/ |/| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.7.2-rc1v1.7.2-rc1Junio C Hamano2010-06-302-5/+12
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'ar/decorate-color'Junio C Hamano2010-06-301-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ar/decorate-color: Add test for correct coloring of git log --decoration Allow customizable commit decorations colors log --decorate: Colorize commit decorations log-tree.c: Use struct name_decoration's type for classifying decoration commit.h: add 'type' to struct name_decoration
| * | | Allow customizable commit decorations colorsNazri Ramliy2010-06-241-0/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'mg/doc-rev-parse-treepath-syntax'Junio C Hamano2010-06-301-6/+9
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | * mg/doc-rev-parse-treepath-syntax: git-rev-parse.txt: Add more examples for caret and colon git-rev-parse.txt: Document ":path" specifier
| * | | git-rev-parse.txt: Add more examples for caret and colonMichael J Gruber2010-06-291-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several items in the caret, colon and friends section contain examples already. Make sure they all come with examples, and that examples come early so that they serve as a visual guide, as well. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | git-rev-parse.txt: Document ":path" specifierMichael J Gruber2010-06-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The empty treeish in ":path" means "index". This is actually a special case of the ":stage:path" syntax where it is documented, but mentioning it also together with "treeish:path" is helpful, so do it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'cc/cherry-pick-stdin'Junio C Hamano2010-06-301-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cc/cherry-pick-stdin: revert: do not rebuild argv on heap revert: accept arbitrary rev-list options t3508 (cherry-pick): futureproof against unmerged files
| * \ \ \ Merge commit 'v1.7.2-rc0~6^2' into cc/cherry-pick-stdinJunio C Hamano2010-06-292-1/+8
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'v1.7.2-rc0~6^2': DWIM 'git show -5' to 'git show --do-walk -5' Documentation/SubmittingPatches: Fix typo in GMail section Documentation/config: describe status.submodulesummary This commit fixes one test in t3508 by making "cherry-pick -<num>" walk the history. A test update from Elijah Newren is squashed as an evil merge.
| * | | | | revert: accept arbitrary rev-list optionsChristian Couder2010-06-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be useful to do something like: git rev-list --reverse master -- README | git cherry-pick -n --stdin without using xargs. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jl/status-ignore-submodules'Junio C Hamano2010-06-301-0/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jl/status-ignore-submodules: Add the option "--ignore-submodules" to "git status" git submodule: ignore dirty submodules for summary and status Conflicts: builtin/commit.c t/t7508-status.sh wt-status.c wt-status.h
| * | | | | | Add the option "--ignore-submodules" to "git status"Jens Lehmann2010-06-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some use cases it is not desirable that "git status" considers submodules that only contain untracked content as dirty. This may happen e.g. when the submodule is not under the developers control and not all build generated files have been added to .gitignore by the upstream developers. Using the "untracked" parameter for the "--ignore-submodules" option disables checking for untracked content and lets git diff report them as changed only when they have new commits or modified content. Sometimes it is not wanted to have submodules show up as changed when they just contain changes to their work tree (this was the behavior before 1.7.0). An example for that are scripts which just want to check for submodule commits while ignoring any changes to the work tree. Also users having large submodules known not to change might want to use this option, as the - sometimes substantial - time it takes to scan the submodule work tree(s) is saved when using the "dirty" parameter. And if you want to ignore any changes to submodules, you can now do that by using this option without parameters or with "all" (when the config option status.submodulesummary is set, using "all" will also suppress the output of the submodule summary). A new function handle_ignore_submodules_arg() is introduced to parse this option new to "git status" in a single location, as "git diff" already knew it. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jn/grep-open'Junio C Hamano2010-06-301-0/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/grep-open: t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script t/t7811-grep-open.sh: ensure fake "less" is made executable t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression grep -O: allow optional argument specifying the pager (or editor) grep: Add the option '--open-files-in-pager' Unify code paths of threaded greps grep: refactor grep_objects loop into its own function Conflicts: t/t7006-pager.sh
| * \ \ \ \ \ \ Merge branch 'jp/string-list-api-cleanup' into jn/grep-openJulian Phillips2010-06-271-2/+2
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An evil merge to adjust the series to cleaned-up API. From: Julian Phillips <julian@quantumfyre.co.uk> Subject: [PATCH v2 7/7] grep: fix string_list_append calls Date: Sat, 26 Jun 2010 00:41:39 +0100 Message-ID: <20100625234140.18927.35025.julian@quantumfyre.co.uk> * jp/string-list-api-cleanup: string_list: Fix argument order for string_list_append string_list: Fix argument order for string_list_lookup string_list: Fix argument order for string_list_insert_at_index string_list: Fix argument order for string_list_insert string_list: Fix argument order for for_each_string_list string_list: Fix argument order for print_string_list Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | grep -O: allow optional argument specifying the pager (or editor)Johannes Schindelin2010-06-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose you want to edit all files that contain a specific search term. Of course, you can do something totally trivial such as git grep -z -e <term> | xargs -0r vi +/<term> but maybe you are happy that the same will be achieved by git grep -Ovi <term> now. [jn: rebased and added tests] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | grep: Add the option '--open-files-in-pager'Johannes Schindelin2010-06-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an option to open the matching files in the pager, and if the pager happens to be "less" (or "vi") and there is only one grep pattern, it also jumps to the first match right away. The short option was chose as '-O' to avoid clashes with GNU grep's options (as suggested by Junio). So, 'git grep -O abc' is a short form for 'less +/abc $(grep -l abc)' except that it works also with spaces in file names, and it does not start the pager if there was no matching file. [jn: rebased and added tests; with error handling fix from Junio squashed in] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>