Skip to content
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.

Commit

Permalink
Minor whitespace cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
  • Loading branch information
myabc committed Jun 29, 2010
1 parent e723609 commit 6b2838a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion release/modules/ext/org.eclipse.jgit.LICENSE.txt
Expand Up @@ -39,4 +39,3 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */

16 changes: 8 additions & 8 deletions src/org/nbgit/client/CheckoutBuilder.java
Expand Up @@ -192,19 +192,19 @@ private void backupFile(File file) throws IOException {
* Code originally from GitIndex. * Code originally from GitIndex.
*/ */
private void checkoutEntry(GitIndex.Entry e, File file) throws IOException { private void checkoutEntry(GitIndex.Entry e, File file) throws IOException {
file.delete(); file.delete();
file.getParentFile().mkdirs(); file.getParentFile().mkdirs();


FileChannel channel = new FileOutputStream(file).getChannel(); FileChannel channel = new FileOutputStream(file).getChannel();
try { try {
byte[] bytes = repository.openBlob(e.getObjectId()).getBytes(); byte[] bytes = repository.openBlob(e.getObjectId()).getBytes();
ByteBuffer buffer = ByteBuffer.wrap(bytes); ByteBuffer buffer = ByteBuffer.wrap(bytes);
if (channel.write(buffer) != bytes.length) if (channel.write(buffer) != bytes.length)
throw new IOException("Could not write file " + file); throw new IOException("Could not write file " + file);
} finally { } finally {
channel.close(); channel.close();
} }
setExecutable(file, FileMode.EXECUTABLE_FILE.equals(e.getModeBits())); setExecutable(file, FileMode.EXECUTABLE_FILE.equals(e.getModeBits()));
} }


} }
2 changes: 1 addition & 1 deletion test/unit/src/org/nbgit/client/CommitBuilderTest.java
Expand Up @@ -138,4 +138,4 @@ private void refTreeEntry(TreeEntry entry) throws Exception {
entry.getMode().getBits(), entry.getId().name(), entry.getFullName())); entry.getMode().getBits(), entry.getId().name(), entry.getFullName()));
} }


} }

0 comments on commit 6b2838a

Please sign in to comment.