Skip to content

recursively grep across submodules

Brandon Williams git 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest7 patches 1 replyIn review
  2. v66 patches 25 repliesSuperseded
  3. v56 patches 5 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v46 patches10 repliesSuperseded
v36 patches14 repliesSuperseded
v26 patches13 repliesSuperseded
v1 RFC5 patches9 repliesSuperseded

Changes in v7 from the cover letter

* Rebased on 'origin/bw/realpath-wo-chdir' in order to fix the race condition that occurs when verifying a submodule's gitdir.
* Reverted is_submodule_populated() to use resolve_gitdir() now that there is no race condition.
* Added !MINGW to a test in t7814 so that it won't run on windows. This is due to testing if colons in filenames are still handled correctly, yet windows doesn't allow colons in filenames.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7submodules: add helper to determine if a submodule is populatedsubmodule.c submodule.h+16 -00 replies
2/7submodules: add helper to determine if a submodule is initializedsubmodule.c submodule.h+24 -00 replies
3/7submodules: load gitmodules file from commit sha1cache.h config.c submodule-config.c +3 more+25 -70 replies
4/7grep: add submodules as a grep source typegrep.c grep.h+16 -10 replies
5/7grep: optionally recurse into submodulesDocumentation/git-grep.txt builtin/grep.c git.c +1 more+386 -200 replies
6/7grep: enable recurse-submodules to work on <tree> objectsDocumentation/git-grep.txt builtin/grep.c t/t7814-grep-recurse-submodules.sh +1 more+211 -90 replies
7/7grep: search history of moved submodulesbuiltin/grep.c t/t7814-grep-recurse-submodules.sh+59 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [PATCH v7 0/7] recursively grep across submodules

Changes in v7:
* Rebased on 'origin/bw/realpath-wo-chdir' in order to fix the race condition that occurs when verifying a submodule's gitdir.
* Reverted is_submodule_populated() to use resolve_gitdir() now that there is no race condition.
* Added !MINGW to a test in t7814 so that it won't run on windows. This is due to testing if colons in filenames are still handled correctly, yet windows doesn't allow colons in filenames.

Brandon Williams (7):
submodules: add helper to determine if a submodule is populated
submodules: add helper to determine if a submodule is initialized
submodules: load gitmodules file from commit sha1
grep: add submodules as a grep source type
grep: optionally recurse into submodules
grep: enable recurse-submodules to work on <tree> objects
grep: search history of moved submodules

 Documentation/git-grep.txt         |  14 ++
 builtin/grep.c                     | 386 ++++++++++++++++++++++++++++++++++---
 cache.h                            |   2 +
 config.c                           |   8 +-
 git.c                              |   2 +-
 grep.c                             |  16 +-
 grep.h                             |   1 +
 submodule-config.c                 |   6 +-
 submodule-config.h                 |   3 +
 submodule.c                        |  50 +++++
 submodule.h                        |   3 +
 t/t7814-grep-recurse-submodules.sh | 241 +++++++++++++++++++++++
 tree-walk.c                        |  28 +++
 13 files changed, 729 insertions(+), 31 deletions(-)
 create mode 100755 t/t7814-grep-recurse-submodules.sh
Signature · 1 line
2.8.0.rc3.226.g39d4020