-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tito build without .tito directory #474
Conversation
7e2ef33
to
8ed0932
Compare
self.config = ConfigLoader(package_name, build_dir, tag).load() | ||
self.config = self.initial_config | ||
if not self.options.without_init: | ||
self.config = ConfigLoader(package_name, build_dir, tag).load() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be:
if self.options.without_init:
self.config = self.initial_config
else:
self.config = ConfigLoader(package_name, build_dir, tag).load()
And the error message of ConfigLoader() should be altered and when it prints:
ERROR: Unable to locate branch configuration: /home/msuchy/fedora/git/gnome-logs/rel-eng/tito.props
Please run 'tito init'
We should add a line:
or run tito --without-init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points, thank you. Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Why we can't simply do this even without an explicit |
I don't have a strong opinion on this. My reasoning was that running Tito without init, albeit very useful in some cases, it is still a non-typical usage. And I wanted to communicate that to users. But there is no hard requirement for this, we can make this behavior implicit if we want to. |
Because this way user has to explicitly admit that he is operating with default setting of Tito project. And not with the setting of the git project. |
I don't know. If it is possible, and we can issue a warning to "push the user" toward a useful configuration (while the option could silence the warnings), the explicit option only complicates integrating this feature into higher level tools like Copr (special option needs to be implemented just for this). |
Fix #472