Skip to content

Commit

Permalink
fix: fix rootDirectory determination for sub working trees
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon committed Jan 12, 2022
1 parent 7a8cbc5 commit b6b30e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

# Changelog

## 7.1.3

##### Fixes
* fix `rootDirectory` determination for sub working trees

## 7.1.2

##### Fixes
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>7.1.2</version>
<version>7.1.3</version>
<packaging>maven-plugin</packaging>

<name>Maven Git Versioning Extension</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class GitSituation {

public GitSituation(Repository repository) throws IOException {
this.repository = repository;
this.rootDirectory = repository.getWorkTree();
this.rootDirectory = repository.getDirectory().getParentFile();
this.head = repository.resolve(HEAD);
this.rev = head != null ? head.getName() : NO_COMMIT;
}
Expand Down

0 comments on commit b6b30e4

Please sign in to comment.