Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit e049109

Browse files
committed
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
2 parents 7b4e2b7 + cbfe47b commit e049109

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

diff.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4139,9 +4139,9 @@ void diff_debug_filespec(struct diff_filespec *s, int x, const char *one)
41394139
DIFF_FILE_VALID(s) ? "valid" : "invalid",
41404140
s->mode,
41414141
s->sha1_valid ? sha1_to_hex(s->sha1) : "");
4142-
fprintf(stderr, "queue[%d] %s size %lu flags %d\n",
4142+
fprintf(stderr, "queue[%d] %s size %lu\n",
41434143
x, one ? one : "",
4144-
s->size, s->xfrm_flags);
4144+
s->size);
41454145
}
41464146

41474147
void diff_debug_filepair(const struct diff_filepair *p, int i)

diffcore.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ struct diff_filespec {
2929
char *path;
3030
void *data;
3131
void *cnt_data;
32-
const char *funcname_pattern_ident;
3332
unsigned long size;
3433
int count; /* Reference count */
35-
int xfrm_flags; /* for use by the xfrm */
3634
int rename_used; /* Count of rename users */
3735
unsigned short mode; /* file mode */
3836
unsigned sha1_valid : 1; /* if true, use sha1 and trust mode;
@@ -43,13 +41,13 @@ struct diff_filespec {
4341
unsigned should_free : 1; /* data should be free()'ed */
4442
unsigned should_munmap : 1; /* data should be munmap()'ed */
4543
unsigned dirty_submodule : 2; /* For submodules: its work tree is dirty */
46-
unsigned is_stdin : 1;
4744
#define DIRTY_SUBMODULE_UNTRACKED 1
4845
#define DIRTY_SUBMODULE_MODIFIED 2
46+
unsigned is_stdin : 1;
4947
unsigned has_more_entries : 1; /* only appear in combined diff */
50-
struct userdiff_driver *driver;
5148
/* data should be considered "binary"; -1 means "don't know yet" */
52-
int is_binary;
49+
int is_binary : 2;
50+
struct userdiff_driver *driver;
5351
};
5452

5553
extern struct diff_filespec *alloc_filespec(const char *);

0 commit comments

Comments
 (0)