Skip to content

Commit

Permalink
Updated from JGit
Browse files Browse the repository at this point in the history
----------------------------------------------------
JGit commit e24005de2d28bf6c246e2ce4e5413ae136920877
Fix DirCache.isModified()

Change I61a1b45db2d60fdcc0f87373ac6fd75ac4c4a202 fixed a possible NPE
occurring for newly created repositories - but in that case a wrong
value (false = not modified) was returned.

If a current version of the index file exists (liveFile), but there is
no snapshot, this means that there have been modifications (i.e. true
has to be returned).

Change-Id: I698f78112249f9924860fc58eb7eab7afdf87eb7
Signed-off-by: Philipp Thun <philipp.thun@sap.com>

----------------------------------------------------
JGit commit efad7327ca277f493a2c577866fed75702cd08ed
[findbugs] Use explicit initialization

Findbugs doesn't like using implicitly initialized field in
initializer.

Change-Id: Ic1ff9011813cc02950a71df587f31ed9f8415b49
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>

----------------------------------------------------
JGit commit 7aec8247c1ecd8e75f1e41a3d06bd69022d38486
[findbugs] Make mutable static field final

Change-Id: I310bc2093571bf22a58106f09706cc3eb43a2453
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
  • Loading branch information
slluis committed Apr 5, 2011
1 parent b66515d commit d65637c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions NGit/NGit.Api/CherryPickResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ private CherryPickResult(CherryPickResult.CherryPickStatus status)
/// A <code>CherryPickResult</code> with status
/// <see cref="CherryPickStatus.CONFLICTING">CherryPickStatus.CONFLICTING</see>
/// </summary>
public static NGit.Api.CherryPickResult CONFLICT = new NGit.Api.CherryPickResult(
CherryPickResult.CherryPickStatus.CONFLICTING);
public static readonly NGit.Api.CherryPickResult CONFLICT = new NGit.Api.CherryPickResult
(CherryPickResult.CherryPickStatus.CONFLICTING);

/// <returns>the status this cherry-pick resulted in</returns>
public virtual CherryPickResult.CherryPickStatus GetStatus()
Expand Down
2 changes: 1 addition & 1 deletion NGit/NGit.Dircache/DirCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public virtual bool IsOutdated()
{
return false;
}
return snapshot != null && snapshot.IsModified(liveFile);
return snapshot == null || snapshot.IsModified(liveFile);
}

/// <summary>Empty this index, removing all entries.</summary>
Expand Down
2 changes: 1 addition & 1 deletion NGit/NGit.Util/BlockList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public override void Remove()
internal MyIterator(BlockList<T> _enclosing)
{
this._enclosing = _enclosing;
block = this._enclosing.directory[this.dirIdx];
block = this._enclosing.directory[0];
}

private readonly BlockList<T> _enclosing;
Expand Down
6 changes: 3 additions & 3 deletions gen/cs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3494,7 +3494,7 @@ index d902038..bb6fd35 100644
b4[b4Posn++] = sbiCrop;
if (b4Posn > 3)
diff --git a/NGit/NGit.Util/BlockList.cs b/NGit/NGit.Util/BlockList.cs
index 81693c4..96e7be5 100644
index 672fa1b..c32292d 100644
--- a/NGit/NGit.Util/BlockList.cs
+++ b/NGit/NGit.Util/BlockList.cs
@@ -96,8 +96,8 @@ namespace NGit.Util
Expand Down Expand Up @@ -3604,7 +3604,7 @@ index 81693c4..96e7be5 100644

private int blkIdx;

- private T[] block = this._enclosing.directory[this.dirIdx];
- private T[] block = this._enclosing.directory[0];
+ private T[] block;

public override bool HasNext()
Expand Down Expand Up @@ -3634,7 +3634,7 @@ index 81693c4..96e7be5 100644
internal MyIterator(BlockList<T> _enclosing)
{
this._enclosing = _enclosing;
+ block = this._enclosing.directory[this.dirIdx];
+ block = this._enclosing.directory[0];
}

private readonly BlockList<T> _enclosing;
Expand Down
2 changes: 1 addition & 1 deletion gen/lastrev
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7b3a6ef5306154240030a6de528bde0c482db0dd
e24005de2d28bf6c246e2ce4e5413ae136920877

0 comments on commit d65637c

Please sign in to comment.