git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Destructive pre-commit behaviour and "--all"
@ 2023-03-22 10:34 Jan Rüegg
  2023-03-22 20:00 ` Chris Torek
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Rüegg @ 2023-03-22 10:34 UTC (permalink / raw)
  To: git

Why doesn't "git commit --all" keep the files added to the staging
area, so "git commit --all" would have the same behaviour as "git add
--all && git commit"?

As described here a pre-commit hook which changes files, when run with
"git commit --all", will make it impossible to see what the hook
changed.

Making "git commit --all" and "git add --all && git commit" have the
same behaviour (or at least having that configurable) would allow
looking (and reverting if necessary) the changes generated by the
hooks.

- Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-28  9:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 10:34 Destructive pre-commit behaviour and "--all" Jan Rüegg
2023-03-22 20:00 ` Chris Torek
2023-03-22 21:26   ` Chris Torek
2023-03-22 21:58     ` Junio C Hamano
2023-03-28  9:33       ` Jan Rüegg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).