Code Monkey home page Code Monkey logo

Comments (5)

halostatue avatar halostatue commented on September 27, 2024 1

You can do this with a more extensive commitMessageTemplate string or the new (as yet unreleased) commitMessageTemplateFile specification. You would need to add your custom message at the top and copy the default commit message template into your template.

@twpayne I wonder if it might be possible to have something like {{ includeTemplate "chezmoi:COMMIT_MESSAGE.tmpl" }} work?

from chezmoi.

twpayne avatar twpayne commented on September 27, 2024

You can do this with a more extensive commitMessageTemplate string or the new (as yet unreleased) commitMessageTemplateFile specification. You would need to add your custom message at the top and copy the default commit message template into your template.

Exactly. Please wait for commitMessageTemplateFile and copy the default commit message template.

@twpayne I wonder if it might be possible to have something like {{ includeTemplate "chezmoi:COMMIT_MESSAGE.tmpl" }} work?

I think that something like this makes sense when chezmoi has multiple built-in templates. Right now, this is not the case and copying the standard template instead makes sense.

from chezmoi.

halostatue avatar halostatue commented on September 27, 2024

@twpayne I wonder if it might be possible to have something like {{ includeTemplate "chezmoi:COMMIT_MESSAGE.tmpl" }} work?

I think that something like this makes sense when chezmoi has multiple built-in templates. Right now, this is not the case and copying the standard template instead makes sense.

Not that the COMMIT_MESSAGE.tmpl file has changed recently, but includeTemplate "chezmoi:COMMIT_MESSAGE.tmpl" support would make it so that if it were updated, people would get the benefit on upgrade without having to learn that COMMIT_MESSAGE.tmpl has been updated upstream.

from chezmoi.

twpayne avatar twpayne commented on September 27, 2024

There's an added complication that with #3322 the structure of the data passed to COMMIT_MESSAGE.tmpl changed from passing just the git status as . to passing a full set of chezmoi template variables in .chezmoi with the status in .chezmoi.status and a bunch of field renames for consistency. Effectively, #3322 makes the data passed to COMMIT_MESSAGE.tmpl part of chezmoi's API (relevant XKCD.

from chezmoi.

twpayne avatar twpayne commented on September 27, 2024

Fixed by #3322. Please re-open if you have further questions.

from chezmoi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.