summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-08-13 11:33:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-13 17:44:51 (GMT)
commit4eba1fe6156739e69e8cf3c1e84a9f050d91a884 (patch)
tree62476cef79607fe3e813c5f0b721b7004c7f531f /range-diff.c
parenteb0be38cc94d308fc114289e9555523ae34433b1 (diff)
downloadgit-4eba1fe6156739e69e8cf3c1e84a9f050d91a884.zip
git-4eba1fe6156739e69e8cf3c1e84a9f050d91a884.tar.gz
git-4eba1fe6156739e69e8cf3c1e84a9f050d91a884.tar.bz2
range-diff: do not show "function names" in hunk headers
We are comparing complete, formatted commit messages with patches. There are no function names here, so stop looking for them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/range-diff.c b/range-diff.c
index 23aa61a..6d75563 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -9,6 +9,7 @@
#include "diffcore.h"
#include "commit.h"
#include "pretty.h"
+#include "userdiff.h"
struct patch_util {
/* For the search for an exact match */
@@ -302,6 +303,10 @@ static void output_pair_header(struct strbuf *buf,
fwrite(buf->buf, buf->len, 1, stdout);
}
+static struct userdiff_driver no_func_name = {
+ .funcname = { "$^", 0 }
+};
+
static struct diff_filespec *get_filespec(const char *name, const char *p)
{
struct diff_filespec *spec = alloc_filespec(name);
@@ -311,6 +316,7 @@ static struct diff_filespec *get_filespec(const char *name, const char *p)
spec->size = strlen(p);
spec->should_munmap = 0;
spec->is_stdin = 1;
+ spec->driver = &no_func_name;
return spec;
}