Unverified Commit 494a2f23 by Edward Thomson Committed by GitHub

Merge pull request #4426 from pks-t/pks/diff-flag-set-fix

diff_generate: fix unsetting diff flags
parents 6cf53e8f 5ca3f115
...@@ -13,13 +13,6 @@ ...@@ -13,13 +13,6 @@
#include "commit.h" #include "commit.h"
#include "index.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 { struct patch_id_args {
git_hash_ctx ctx; git_hash_ctx ctx;
git_oid result; git_oid result;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
(((DIFF)->base.opts.flags & (FLAG)) == 0) (((DIFF)->base.opts.flags & (FLAG)) == 0)
#define DIFF_FLAG_SET(DIFF,FLAG,VAL) (DIFF)->base.opts.flags = \ #define DIFF_FLAG_SET(DIFF,FLAG,VAL) (DIFF)->base.opts.flags = \
(VAL) ? ((DIFF)->base.opts.flags | (FLAG)) : \ (VAL) ? ((DIFF)->base.opts.flags | (FLAG)) : \
((DIFF)->base.opts.flags & ~(VAL)) ((DIFF)->base.opts.flags & ~(FLAG))
typedef struct { typedef struct {
struct git_diff base; struct git_diff base;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment