lkishalmi commented on a change in pull request #3334:
URL: https://github.com/apache/netbeans/pull/3334#discussion_r757693820
##########
File path: nbbuild/antsrc/org/netbeans/nbbuild/GitBranchHash.java
##########
@@ -79,31 +79,40 @@ public void execute() throws BuildException {
if (headroot != null && Files.size(headroot) > 0l) {
List<String> lines = Files.readAllLines(headroot);
String line = lines.get(0);
- String revLink = line.substring(line.indexOf(':')+1).trim();
- branch = revLink.substring(revLink.lastIndexOf('/')+1).trim();
- Path revPath = headroot.getParent().resolve(revLink);
- if(Files.isRegularFile(revPath) && Files.size(revPath) > 0l) {
- List<String> revlines = Files.readAllLines(revPath);
- String revline = revlines.get(0);
- if(revline.length()>=12){
- hash = revline.trim();
+ if (!line.contains(":") && (line.length() == 40)) {
Review comment:
I do not know that either. Just made some adjustments to work with a
detached head.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists