summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-27 18:45:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-27 18:45:03 (GMT)
commite049109ef11be4e164c6f0426fb77c9c7a1ab647 (patch)
tree9dac08e47724ecfe383331b49685c707aa4e2453
parent7b4e2b7e6aba677fcefffde79d0d3a53ae623b4f (diff)
parentcbfe47b67fc1072998c73e6d43cf6ad061a436f5 (diff)
downloadgit-e049109ef11be4e164c6f0426fb77c9c7a1ab647.zip
git-e049109ef11be4e164c6f0426fb77c9c7a1ab647.tar.gz
git-e049109ef11be4e164c6f0426fb77c9c7a1ab647.tar.bz2
Merge branch 'jk/diff-filespec-cleanup'
* jk/diff-filespec-cleanup: diff_filespec: use only 2 bits for is_binary flag diff_filespec: reorder is_binary field diff_filespec: drop xfrm_flags field diff_filespec: drop funcname_pattern_ident field diff_filespec: reorder dirty_submodule macro definitions
-rw-r--r--diff.c4
-rw-r--r--diffcore.h8
2 files changed, 5 insertions, 7 deletions
diff --git a/diff.c b/diff.c
index 6b4cd0e..8e4a6a9 100644
--- a/diff.c
+++ b/diff.c
@@ -4139,9 +4139,9 @@ void diff_debug_filespec(struct diff_filespec *s, int x, const char *one)
DIFF_FILE_VALID(s) ? "valid" : "invalid",
s->mode,
s->sha1_valid ? sha1_to_hex(s->sha1) : "");
- fprintf(stderr, "queue[%d] %s size %lu flags %d\n",
+ fprintf(stderr, "queue[%d] %s size %lu\n",
x, one ? one : "",
- s->size, s->xfrm_flags);
+ s->size);
}
void diff_debug_filepair(const struct diff_filepair *p, int i)
diff --git a/diffcore.h b/diffcore.h
index 1c16c85..79de8cf 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -29,10 +29,8 @@ struct diff_filespec {
char *path;
void *data;
void *cnt_data;
- const char *funcname_pattern_ident;
unsigned long size;
int count; /* Reference count */
- int xfrm_flags; /* for use by the xfrm */
int rename_used; /* Count of rename users */
unsigned short mode; /* file mode */
unsigned sha1_valid : 1; /* if true, use sha1 and trust mode;
@@ -43,13 +41,13 @@ struct diff_filespec {
unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */
unsigned dirty_submodule : 2; /* For submodules: its work tree is dirty */
- unsigned is_stdin : 1;
#define DIRTY_SUBMODULE_UNTRACKED 1
#define DIRTY_SUBMODULE_MODIFIED 2
+ unsigned is_stdin : 1;
unsigned has_more_entries : 1; /* only appear in combined diff */
- struct userdiff_driver *driver;
/* data should be considered "binary"; -1 means "don't know yet" */
- int is_binary;
+ int is_binary : 2;
+ struct userdiff_driver *driver;
};
extern struct diff_filespec *alloc_filespec(const char *);