Skip to content

Commit 16d99d5

Browse files
committed
Disambiguate tags and paths for git log.
1 parent 61d85c0 commit 16d99d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/service/github.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ extend( GithubRepo.prototype, {
120120
},
121121

122122
getReleaseDate: function( tag, fn ) {
123-
exec( "git log --pretty='%cD' -1 " + tag, { cwd: this.path }, function( error, stdout ) {
123+
// The trailing "--" avoids an ambiguous argument in case a repo
124+
// contains a path that matches the tag name
125+
exec( "git log --pretty='%cD' -1 " + tag + " --", { cwd: this.path }, function( error, stdout ) {
124126
if ( error ) {
125127
return fn( error );
126128
}

0 commit comments

Comments
 (0)