dyne / gitzone

git-based zone management tool for static and dynamic domains
https://www.dyne.org/software/gitzone/
GNU Affero General Public License v3.0
117 stars 20 forks source link

Backward git compatibility -B switch #1

Closed epcim closed 10 years ago

epcim commented 10 years ago

https://github.com/dyne/gitzone/blob/a546e75c82fde864c1a01be8129818395229a55f/bin/gitzone#L309

I would ask you to split line in multiple commands, since the -B swich is supported with latest git cmd, however for example rhel 6.5 uses git-1.7.1-3.el6_4.1.x86_64 which don't know such option.

jaromil commented 10 years ago

hello, Interesting, but I can't really reproduce this bug. how to make it so that it is compatible everywhere? do you have a suggestion for multiple line commands or a patch?

jaromil commented 10 years ago

Just asked gitzone's original author tg. He got the point:

17:50   man git-checkout
17:50              If -B is given,  is created if it doesn’t exist; otherwise, it is reset. 
17:50              This is the transactional equivalent of
17:50                  $ git branch -f  []
17:50                  $ git checkout 
17:50   I think he meant using these two commands instead
epcim commented 10 years ago

I guess that's correct fix - I am about to run tests..

jaromil commented 10 years ago

let me know how it goes 10x

epcim commented 10 years ago

Well the git branch -f [] returns fatal: '[]' is not a valid branch name. on git version 1.9.2 and git version 1.7.9.5. Obviously you thougt to use git branch -f new; git checkout (not the []). BTW: on the git versions mentioned the -B flag is not know either.

Please replace [] with "new" -> git branch -f new; git checkout. That works for me.