1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge branch 'sds-fetch-revision-12-chars'

This commit is contained in:
Lee Hambley 2015-08-10 10:13:51 +02:00
commit f3b94eb1f7
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ https://github.com/capistrano/capistrano/compare/v3.4.0...HEAD
* Print a warning and abort if "load:defaults" is erroneously invoked after
capistrano is already loaded, e.g. when a plugin is loaded in `deploy.rb`
instead of `Capfile`. (@mattbrictson)
* Return first 12 characters (instead of 7) of SHA1 hash when determining current git revision (@sds)
## `3.4.0`

View file

@ -48,7 +48,7 @@ class Capistrano::Git < Capistrano::SCM
end
def fetch_revision
context.capture(:git, "rev-list --max-count=1 --abbrev-commit #{fetch(:branch)}").strip
context.capture(:git, "rev-list --max-count=1 --abbrev-commit --abbrev=12 #{fetch(:branch)}").strip
end
end
end