简体   繁体   中英

Can/should I use a pre-commit written in python to request people to respect a certain workflow?

I want that if someone add modification to a.tex, it must have is.pdf version compiled.

I've been interested in using Pre-commit with hooks to request people to respect a certain workflow.

To be clear, I want that if someone add modification to a.tex, it must have his.pdf version compiled to ensure that everyone can look at the file at a glance. I've done some search about pre-commit and they are always talking about using python, docker, ... Should I write a simple python script to put in my pre-commit?

Thank you for anyone that can help me explain those things. I wish you a good day or night wherever you are.

I've done some search about pre-commit and they are always talking about using python, docker

You can use any program/scripting language you want, as long as:

  • your repo/.git/hook/pre-commit file is an executable
  • you have a way to distribute/update that hook for every user of your repository
  • you understand a client-side hook can be bypassed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM