summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-11-30 21:45:27 +0000
committerGitHub <noreply@github.com>2017-11-30 21:45:27 +0000
commit494a2f235fd13de5f927ad64db0b3597569f02b9 (patch)
treeb49b6ccf0cb43d1ac5eaff1561797caa0cc5f0a8
parent6cf53e8f98bec69ff4129fbb494b3995c8916389 (diff)
parent5ca3f11592426f80c004cea5beefc0d05f23265b (diff)
downloadlibgit2-494a2f235fd13de5f927ad64db0b3597569f02b9.tar.gz
Merge pull request #4426 from pks-t/pks/diff-flag-set-fix
diff_generate: fix unsetting diff flags
-rw-r--r--src/diff.c7
-rw-r--r--src/diff_generate.c2
2 files changed, 1 insertions, 8 deletions
diff --git a/src/diff.c b/src/diff.c
index b2a5ff947..c7a652896 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -13,13 +13,6 @@
#include "commit.h"
#include "index.h"
-#define DIFF_FLAG_IS_SET(DIFF,FLAG) \
- (((DIFF)->opts.flags & (FLAG)) != 0)
-#define DIFF_FLAG_ISNT_SET(DIFF,FLAG) \
- (((DIFF)->opts.flags & (FLAG)) == 0)
-#define DIFF_FLAG_SET(DIFF,FLAG,VAL) (DIFF)->opts.flags = \
- (VAL) ? ((DIFF)->opts.flags | (FLAG)) : ((DIFF)->opts.flags & ~(VAL))
-
struct patch_id_args {
git_hash_ctx ctx;
git_oid result;
diff --git a/src/diff_generate.c b/src/diff_generate.c
index 6b3fa4fc5..bce2a683b 100644
--- a/src/diff_generate.c
+++ b/src/diff_generate.c
@@ -24,7 +24,7 @@
(((DIFF)->base.opts.flags & (FLAG)) == 0)
#define DIFF_FLAG_SET(DIFF,FLAG,VAL) (DIFF)->base.opts.flags = \
(VAL) ? ((DIFF)->base.opts.flags | (FLAG)) : \
- ((DIFF)->base.opts.flags & ~(VAL))
+ ((DIFF)->base.opts.flags & ~(FLAG))
typedef struct {
struct git_diff base;