Will Saxon edited a comment on Bug JENKINS-21114

I also found that when using msysgit on windows, it expects the objects/info/alternates file to have unix line endings. So even if the path is correct, it fetches the packs anyway.

Here is a patch against 1.6.0 which fixes the problem on my system:


diff --git a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java b/src/main/java/org/jenkinsci/plugins/gitclient/
index cd6b092..2de9f66 100644
--- a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
+++ b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
@@ -335,7 +335,8 @@ public class CliGitAPIImpl extends LegacyCompatibleGitAPIImpl {
                         try {
                             File alternates = new File(workspace, ".git/objects/info/alternates");
                             PrintWriter w = new PrintWriter(alternates);
-                            w.println(new File(referencePath, ".git/objects").getAbsolutePath());
+                            w.print(new File(referencePath, reference.endsWith(".git") ? "/objects" : ".git/objects").getAbso
+                            w.print("\n");
                             w.close();
                         } catch (FileNotFoundException e) {
                             listener.error("Failed to setup reference");


Not sure if this will work everywhere or not.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to