Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Conversation

mkissam
Copy link
Contributor

@mkissam mkissam commented Sep 29, 2015

When latest attribute is set to true, and the git commit
attribute is changed, the HEAD will be updated to the
new ref. It also provides the ability to trigger refresh events
on commit change in the resource.

Example:
git { 'vcsrepo':
ensure => present,
origin => 'https://github.com/puppetlabs/puppetlabs-vcsrepo.git',
path => '/opt/repo/vcsrepo',
commit => '57cd521d35a4ea169382479403fbc89437428ae1',
latest => true,
}

@nanliu
Copy link
Contributor

nanliu commented Sep 30, 2015

If you specify a commit, why would you specify the latest attribute? So either latest => true, branch => ... or just commit => ... (without latest attribute). Is there an issue if you just specify a new commit => ... (does that update correctly?).

@mkissam
Copy link
Contributor Author

mkissam commented Sep 30, 2015

So basically specifying a new commit not updated the working tree and not invoked a notification for subscribed resources. I put this code into latest, because it already had this implementation. Would you like to see this part refactored and move the code under commit property?

So instead of commit => ref and latest => true, a commit => ref change will trigger the same code as we have now for latest?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants