-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
prefs: option to automatically load template commit #1013
Conversation
- Add AUTOTEMPLATE constant to models/prefs.py - Set autotemplate to False in Defaults class Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
- Add checkbox to automatically load commit template - Update autotemplate variable if a change is detected Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
- Replace self.new_commitmsg with template commit message when reinitializing the commit message editor if AUTOTEMPLATE is True Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
- If AUTOTEMPLATE is True, load the commit template when opening a new repository - Fix line length in widgets/prefs.py Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
cola/models/prefs.py
Outdated
@@ -9,6 +9,7 @@ | |||
from ..cmd import Command | |||
|
|||
|
|||
AUTOTEMPLATE = "cola.commit.autotemplate" |
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.
Single quotes for consistency, please. This seems reasonable. One small note -- everywhere else we use just a single flat namespace for config values. e.g. cola.autoloadcommittemplate
is more in-line with the rest of the config keys we use. In documentation we spell it as cola.autoloadCommitTemplate
which helps the readability.
Please make sure this feature is documented in doc/git-cola.rst
in the CONFIGURATION VARIABLES
section.
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.
AUTOTEMPLATE = "cola.commit.autotemplate" | |
AUTOTEMPLATE = "cola.autoloadcommittemplate" |
I used this format because of your comment (see #735 (comment))
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.
Ah, sorry for not remembering. Thanks for the updates.
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.
Documentation, please.
- Change name to further consistency - Change double quotes to single quotes - Document the variable
Signed-off-by: David Aguilar <davvid@gmail.com>
* vnepveu/issue735: Modify and document AUTOTEMPLATE variable preferences: load template when opening repo preferences: replace commit message with template preferences: automatically load commit template preferences: add autotemplate variable Signed-off-by: David Aguilar <davvid@gmail.com>
https://build.opensuse.org/request/show/751369 by user dimstar_suse - Update to 3.6 - Usability, bells and whistles * The remote editor is much faster since it no longer queries remotes, and uses the cached information instead. git-cola/git-cola#986 * Commit message templates can now be loaded automatically by setting ``git config cola.autoloadcommittemplate true``. git-cola/git-cola#1013 git-cola/git-cola#735 * The UI layout can now be reset back to its initial state by selecting the "Reset Layout" action. This reverts the layout to the same state as when the app first launched. git-cola/git-cola#1008 git-cola/git-cola#994 * Files can now be ignored in either the project's `.gitignore`, or in the repository's priv
Closes #735