This series introduces a --function-name=pattern option for git-log, intended
to search for commits which touch a function matching a certain pattern (a
feature we've seen requested and are interested in using ourselves).
This is our first attempt to patch git; we've tried to observe and follow
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
This test builds a sample C file, adding and removing functions, and
checks that the right commits are filtered by --function-name matching.
Signed-off-by: David Dalrymple (on zayin) davi...@alum.mit.edu
---
t/t4213-log-function-name.sh
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
We use userdiff_funcname to make the filetype-dependent function name
pattern available to pickaxe functions.
Signed-off-by: David Dalrymple (on zayin) davi...@alum.mit.edu
---
diffcore-pickaxe.c | 9 +
1 file changed, 9
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
This is similar to the pickaxe grep option (-G), but applies the
provided regex only to diff hunk headers, thereby showing only those
commits which affect a function with a definition line matching the
pattern. These are functions
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
The functionality of userdiff_funcname (determining the language in use
for a given file and setting up patterns to match function names in
that language) is useful outside of diff.c, so here we remove its static
specifier and declare
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
In this file, two functions use identical blocks of code to call the
POSIX regex compiling function and handle a possible error. Here we
factor that block into its own function, in anticipation of using the
same code a third time.
Signed
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
This function type previously accepted separate regex_t and kwset_t
parameters, which conceptually go together. Here we create a struct to
encapsulate them, in anticipation of adding a third field that
pickaxe_fn's may require
From: Bhushan Lodha David A. Dalrymple dad-...@mit.edu
Signed-off-by: David Dalrymple (on zayin) davi...@alum.mit.edu
---
Documentation/diff-options.txt | 9 +
Documentation/gitdiffcore.txt | 17 ++---
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
Since git can intelligently emit diff hunk headers based on the
programming language of each file, assuming that the language is
specified in .gitattributes, it makes sense to specify our own
language (cpp) in our own .gitattributes file
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
For filtering commits by function name, it's useful to identify the
function name in cases such as adding a new function to a file (where
the default functionality will not emit a function name in the hunk
header, because it isn't part
From: Bhushan G. Lodha David A. Dalrymple dad-...@mit.edu
For filtering by function names, it's useful to split hunks whenever a
function line is encountered, so that each function name being deleted
or inserted gets its own hunk header (which then can be easily detected
by the filter
11 matches
Mail list logo