Skip to content

Commit 494a2f2

Browse files
authored
Merge pull request libgit2#4426 from pks-t/pks/diff-flag-set-fix
diff_generate: fix unsetting diff flags
2 parents 6cf53e8 + 5ca3f11 commit 494a2f2

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/diff.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
#include "commit.h"
1414
#include "index.h"
1515

16-
#define DIFF_FLAG_IS_SET(DIFF,FLAG) \
17-
(((DIFF)->opts.flags & (FLAG)) != 0)
18-
#define DIFF_FLAG_ISNT_SET(DIFF,FLAG) \
19-
(((DIFF)->opts.flags & (FLAG)) == 0)
20-
#define DIFF_FLAG_SET(DIFF,FLAG,VAL) (DIFF)->opts.flags = \
21-
(VAL) ? ((DIFF)->opts.flags | (FLAG)) : ((DIFF)->opts.flags & ~(VAL))
22-
2316
struct patch_id_args {
2417
git_hash_ctx ctx;
2518
git_oid result;

src/diff_generate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
(((DIFF)->base.opts.flags & (FLAG)) == 0)
2525
#define DIFF_FLAG_SET(DIFF,FLAG,VAL) (DIFF)->base.opts.flags = \
2626
(VAL) ? ((DIFF)->base.opts.flags | (FLAG)) : \
27-
((DIFF)->base.opts.flags & ~(VAL))
27+
((DIFF)->base.opts.flags & ~(FLAG))
2828

2929
typedef struct {
3030
struct git_diff base;

0 commit comments

Comments
 (0)