Skip to content
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

Load a commit.template message if one is configured (#546) #671

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

wandernauta
Copy link
Contributor

If a commit message template is set with...

git config commit.template /path/to/some/file.txt

...this fills the commit message box (and therefore, later, the external
editor) with the contents of that file, as long as you don't have something
more interesting typed there already.

Like the git commit command, this doesn't let you create a commit that has
just the template as its message, unchanged. Unlike the git commit command,
not being able to read the template file is not fatal: specifically, if the
commit.template setting is pointed at a file that does not exist, this does
nothing.

Resolves #546.

If a commit message template is set with...

    git config commit.template /path/to/some/file.txt

...this fills the commit message box (and therefore, later, the external
editor) with the contents of that file, as long as you don't have something
more interesting typed there already.

Like the `git commit` command, this doesn't let you create a commit that has
just the template as its message, unchanged.  Unlike the `git commit` command,
not being able to read the template file is not fatal: specifically, if the
commit.template setting is pointed at a file that does not exist, this does
nothing.

Resolves gitui-org#546.
@extrawurst extrawurst merged commit fa60610 into gitui-org:master Apr 26, 2021
@extrawurst
Copy link
Collaborator

fixed in 3ad1911

extrawurst pushed a commit that referenced this pull request May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support commit.template
2 participants