git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] grep: submodule support
@ 2010-09-29 20:28 Chris Packham
  2010-09-29 20:28 ` [RFC PATCH 1/3] add test for git grep --recursive Chris Packham
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Chris Packham @ 2010-09-29 20:28 UTC (permalink / raw)
  To: Jens.Lehmann; +Cc: git

This patch series is my initial attempt to add submodule awareness to git grep.
It's also the first time I've played with the git C code so expect bugs. The
patches are based off apply on Jens Lehmann's 'enhance_git_for_submodules'
branch in git://github.com/jlehmann/git-submod-enhancements.git

The first patch adds some basic tests for grep with submodules. There is
probably some overlap with other grep tests so I'll have a more in-depth look
at what is needed later. I have a problem with the tests that when I invoke
'git grep' using run_command I actually end up using the installed git which
doesn't understand my new --submodule-prefix option.

The 2nd patch just adds a --submodule-prefix option so that I can prepend some
text to the output from the sub processes.

The 3rd patch is the main implementation. Currently I rebuild a command line
for the subprocess based on the opts structure and I make use of the modified
argv[0] from the command. Neither of these are really optimal, it'd be much
easier if I could just start my subprocess from cmd_grep (or even grep_cache).
Any pointers to get me moving in this direction are welcome. Even if I retain
the rebuilding of the command line I'd like to rebuild the pattern(s) instead
of relying on the saved_argv[0].

Chris Packham (3):
      add test for git grep --recursive
      grep: prepare grep for submodules
      grep: add support for grepping in submodules

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-10-01 16:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 20:28 [RFC PATCH 0/3] grep: submodule support Chris Packham
2010-09-29 20:28 ` [RFC PATCH 1/3] add test for git grep --recursive Chris Packham
2010-09-29 20:35   ` Ævar Arnfjörð Bjarmason
2010-09-29 20:48     ` Chris Packham
2010-09-29 21:34     ` Kevin Ballard
2010-09-29 20:28 ` [RFC PATCH 2/3] grep: prepare grep for submodules Chris Packham
2010-09-30  1:10   ` Nguyen Thai Ngoc Duy
2010-09-30 18:34     ` Chris Packham
2010-10-01 14:37       ` Nguyen Thai Ngoc Duy
2010-10-01 16:26         ` Chris Packham
2010-09-29 20:28 ` [RFC PATCH 3/3] grep: add support for grepping in submodules Chris Packham
2010-09-29 22:21   ` Jens Lehmann
2010-09-29 22:59     ` Junio C Hamano
2010-09-29 23:47       ` Chris Packham
2010-09-30 11:09         ` Jens Lehmann
2010-09-30 11:28       ` Johannes Sixt
2010-09-30 15:07         ` Jens Lehmann
2010-09-29 23:02     ` Chris Packham
2010-09-30 11:24       ` Jens Lehmann
2010-09-30 16:48         ` Chris Packham
2010-09-30 18:59       ` Heiko Voigt
2010-09-30 19:48         ` Jens Lehmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).