Skip to content

Commit

Permalink
Fix reference repositories on Windows.
Browse files Browse the repository at this point in the history
Windows git did not look-up the alternative object directory if the
alternates file ended with \n, this patch simply changes println to
print for that file. That fixed all my issues with alternates.
  • Loading branch information
Tobias Hieta committed Jan 23, 2014
1 parent 4be87e2 commit 1a51b8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ else if (!referencePath.isDirectory())
File alternates = new File(workspace, ".git/objects/info/alternates");
PrintWriter w = new PrintWriter(alternates);
// git implementations on windows also use
w.println(objectsPath.getAbsolutePath().replace('\\', '/'));
w.print(objectsPath.getAbsolutePath().replace('\\', '/'));
w.close();
} catch (FileNotFoundException e) {
listener.error("Failed to setup reference");
Expand Down

1 comment on commit 1a51b8f

@elan
Copy link

@elan elan commented on 1a51b8f Jan 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Nice 😀

Please sign in to comment.