I am trying to start using source indexing alongside Git on our build server (TeamCity).
I download this project: SourceServer-GitExtensions
While running it i noticed warnings/errors. digging into the script (which is PERL based), i noticed the script runs this function:
sub GetSha1OfFirstCommand {
my $result = `git rev-list --reverse master`;
my @ids = split(/\n/, $result);
return($ids[0]);
}
This is run in an attempt to get the repository's id (id of the first commit i assume).
The problem is, we are currently not using the master branch.
My question is -- is this a proper and robust way of getting the "Repository Id" ? Can i run something else to get the "current branch that is checked out" and not master?