[JGIT PATCH 1/2] Paper bag fix RevWalk.reset after inMergeBase is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to remove delayedFreeFlags from carryFlags anytime we
mark those delayedFreeFlags as actually freeFlags.  In other
words we do not want to continue carrying a flag which we have
now freed and will recycle for a different use in the future,
one which may not want to be carried automatically onto parent
commits during revision traversal.

I had the boolean expression incorrect (call it a typo).  The
correct way to remove set b from a is "a &= ~b" not "a &= b".

Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>
---
 .../src/org/spearce/jgit/revwalk/RevWalk.java      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevWalk.java b/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevWalk.java
index 079432c..5cd7f71 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevWalk.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevWalk.java
@@ -824,7 +824,7 @@ void freeFlag(final int mask) {
 	private void finishDelayedFreeFlags() {
 		if (delayFreeFlags != 0) {
 			freeFlags |= delayFreeFlags;
-			carryFlags &= delayFreeFlags;
+			carryFlags &= ~delayFreeFlags;
 			delayFreeFlags = 0;
 		}
 	}
-- 
1.6.0.2.389.g421e0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux