Bug #2137
Git multiple options does not seem to work
100%
Description
Hi, I’ve been trying to use multiple option in the scm.yaml for my git repo and it doesn’t seem to work and it pass over all options.
I used it with "--bare” and it was working properly, but I wanted to add a template dir after that the "--bare” option was not even working.
So from this working code
production: auto_create: true deny_delete: false pre_create: /usr/local/bin/pre-create.sh post_create: /usr/local/bin/post-create.sh pre_delete: /usr/local/bin/pre-delete.sh post_delete: /usr/local/bin/post-delete.sh git: path: /path/to/repos git: /usr/bin/git options: --bare
To this not working code :
production: auto_create: true deny_delete: false pre_create: /usr/local/bin/pre-create.sh post_create: /usr/local/bin/post-create.sh pre_delete: /usr/local/bin/pre-delete.sh post_delete: /usr/local/bin/post-delete.sh git: path: /path/to/repos git: /usr/bin/git options: - --bare - --template=/path/to/template
when I do it manually with git it work, using this command line :git init --bare --template=/path/to/template repo.git
Associated revisions
History
#1 Updated by Alexandre Lessard almost 12 years ago
I’ve made some tests and the problem is about that line :
append_options(args)
I’ve replaces it by :args = append_options(args)
And now it works with me. Maybe there is something better to do.. but I’m a beginner un Ruby so it’s my solution.
#2 Updated by Alexandre Lessard almost 12 years ago
The problem come from the fact that array + array = new array object
so the reference is lost in the process.
The problem could also be resolved at :
http://projects.andriylesyuk.com/projects/scm-creator/repository/entry/lib/creator/scm_creator.rb#L143
replacing :args += options['options']
By :
options['options'].each do |opt| args << opt end
#3 Updated by Andriy Lesyuk over 11 years ago
- Status changed from New to Open
- Assignee set to Andriy Lesyuk
- Target version set to 0.4.3
Thanks for looking into it!
#4 Updated by Andriy Lesyuk over 11 years ago
- Due date set to 19 May 2013
- Status changed from Open to In Progress
- % Done changed from 0 to 100
Changed to concat
and push
. It would be great, if you could ensure, that it works (going to commit changes soon).
#5 Updated by Andriy Lesyuk over 11 years ago
- Status changed from In Progress to Closed
Assuming it does...