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>
This commit is contained in:

committed by
Junio C Hamano

parent
eb0be38cc9
commit
4eba1fe615
@ -9,6 +9,7 @@
|
|||||||
#include "diffcore.h"
|
#include "diffcore.h"
|
||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include "pretty.h"
|
#include "pretty.h"
|
||||||
|
#include "userdiff.h"
|
||||||
|
|
||||||
struct patch_util {
|
struct patch_util {
|
||||||
/* For the search for an exact match */
|
/* 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);
|
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)
|
static struct diff_filespec *get_filespec(const char *name, const char *p)
|
||||||
{
|
{
|
||||||
struct diff_filespec *spec = alloc_filespec(name);
|
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->size = strlen(p);
|
||||||
spec->should_munmap = 0;
|
spec->should_munmap = 0;
|
||||||
spec->is_stdin = 1;
|
spec->is_stdin = 1;
|
||||||
|
spec->driver = &no_func_name;
|
||||||
|
|
||||||
return spec;
|
return spec;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user