Skip to content

grep: make output consistent with revision syntax

Stefan Hajnoczi git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 12 repliesIn review
  2. v1 RFC2 patches 18 repliesSuperseded

Changes in v2 from the cover letter

* Use obj->type instead of re-parsing name for delimiter (Followed Brandon's suggestion but named the variable 'delim' since that name is used in other places and 'del' is used for deletion.)
* Add tests
* Update Patch 1 commit description with a more relevant example
* PATCH instead of RFC, now works with all documented git-rev-parse(1) syntax

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2grep: only add delimiter if there isn't one alreadybuiltin/grep.c t/t7810-grep.sh+26 -11 reply
2/2grep: use '/' delimiter for pathsbuiltin/grep.c t/t7810-grep.sh+8 -110 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] grep: make output consistent with revision syntax

v2:
* Use obj->type instead of re-parsing name for delimiter (Followed Brandon's suggestion but named the variable 'delim' since that name is used in other places and 'del' is used for deletion.)
* Add tests
* Update Patch 1 commit description with a more relevant example
* PATCH instead of RFC, now works with all documented git-rev-parse(1) syntax

git-grep(1)'s output is not consistent with git-rev-parse(1) revision syntax.

This means you cannot take "rev:path/to/file.c: foo();" output from git-grep(1) and expect "git show rev:path/to/file.c" to work. See the individual patches for examples of command-lines that produce invalid output.

Stefan Hajnoczi (2):
grep: only add delimiter if there isn't one already
grep: use '/' delimiter for paths

 builtin/grep.c  |  8 +++++++-
 t/t7810-grep.sh | 26 ++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.3