toplenboren / simple-git-hooks

A simple git hooks manager for small projects
MIT License
1.34k stars 43 forks source link

How about appending the file contents instead of replacing them? #115

Open chouchouji opened 1 month ago

chouchouji commented 1 month ago

Reason

I set some commands in commit-msg hook by myself. When I use this package, it will rewrite commit-msg file if I set that hook.

Suggestion

How about replacing writeFileSync with appendFileSync?

Code

The source code position is https://github.com/toplenboren/simple-git-hooks/blob/master/simple-git-hooks.js#L204

image

image