Skip to content

Commit

Permalink
Let Git SCM support relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nmasseyKM committed Jun 6, 2022
1 parent 005fc53 commit a42d8f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conan/tools/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_commit(self):
# --full-history is needed to not avoid wrong commits:
# https://github.com/conan-io/conan/issues/10971
# https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt-Defaultmode
commit = self._run('rev-list HEAD -n 1 --full-history -- "{}"'.format(self.folder))
commit = self._run('rev-list HEAD -n 1 --full-history -- "."')
return commit
except Exception as e:
raise ConanException("Unable to get git commit in '%s': %s" % (self.folder, str(e)))
Expand Down

0 comments on commit a42d8f4

Please sign in to comment.