Added options to tag method. #38

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

Adding a tag through base.tag takes an optional hash of options.

  • sha=>[sha commit id] - adds tag to given commit
  • force=>[true|false] - adds -f option to command, will overwrite an existing tag with the same name.

Usage:```
repo.tag("tag_name_1")
repo.tag("tag_name_1", {:force=>true})
repo.tag("tag_name_2", {:sha=>12345678910})
repo.tag("tag_name_2", {:sha=>92345678911, :force=>true})

Steve Griegoliet Modified tag method. Adding a tag through base.tag now takes an optio…
…nal has of options.

	- sha=>[sha commit id] 	- adds tag to given commit
	- force=>[true|false]	- adds -f option to command, will overwrite an existing tag with the same name.
574a015
Collaborator

have you tried this ?

Collaborator

SystemStackError: stack level too deep

I tried it two years ago and it worked; the change is still in a fork of ruby-git and used regularly in a large production application. Other than that I'm unwilling to vouch for it.

Collaborator

It's working this way

g.add_tag('tag_name', 'object_reference', {:options => 'here'})

refs f5caf77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment