|
|
@ -1,6 +1,7 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright (C) 2008-2009, Google Inc. |
|
|
|
* Copyright (C) 2008-2009, Google Inc. |
|
|
|
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> |
|
|
|
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> |
|
|
|
|
|
|
|
* Copyright (C) 2010, Matthias Sohn <matthias.sohn@sap.com> |
|
|
|
* and other copyright owners as documented in the project's IP log. |
|
|
|
* and other copyright owners as documented in the project's IP log. |
|
|
|
* |
|
|
|
* |
|
|
|
* This program and the accompanying materials are made available |
|
|
|
* This program and the accompanying materials are made available |
|
|
@ -114,6 +115,8 @@ public class DirCacheEntry { |
|
|
|
|
|
|
|
|
|
|
|
private static final int ASSUME_VALID = 0x80; |
|
|
|
private static final int ASSUME_VALID = 0x80; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int UPDATE_NEEDED = 0x40; |
|
|
|
|
|
|
|
|
|
|
|
/** (Possibly shared) header information storage. */ |
|
|
|
/** (Possibly shared) header information storage. */ |
|
|
|
private final byte[] info; |
|
|
|
private final byte[] info; |
|
|
|
|
|
|
|
|
|
|
@ -355,6 +358,25 @@ public class DirCacheEntry { |
|
|
|
info[infoOffset + P_FLAGS] &= ~ASSUME_VALID; |
|
|
|
info[infoOffset + P_FLAGS] &= ~ASSUME_VALID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return true if this entry should be checked for changes |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public boolean isUpdateNeeded() { |
|
|
|
|
|
|
|
return (info[infoOffset + P_FLAGS] & UPDATE_NEEDED) != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Set whether this entry must be checked for changes |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param updateNeeded |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setUpdateNeeded(boolean updateNeeded) { |
|
|
|
|
|
|
|
if (updateNeeded) |
|
|
|
|
|
|
|
info[infoOffset + P_FLAGS] |= UPDATE_NEEDED; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
info[infoOffset + P_FLAGS] &= ~UPDATE_NEEDED; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get the stage of this entry. |
|
|
|
* Get the stage of this entry. |
|
|
|
* <p> |
|
|
|
* <p> |
|
|
|