From: "Jan Rüegg" <rggjan@gmail.com>
To: git@vger.kernel.org
Subject: Destructive pre-commit behaviour and "--all"
Date: Wed, 22 Mar 2023 11:34:00 +0100 [thread overview]
Message-ID: <CAMbUV8F8y62n5ud3AoWQak8J==Zrn7kzwTE7jCveVJEpfcqncg@mail.gmail.com> (raw)
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
next reply other threads:[~2023-03-22 10:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 10:34 Jan Rüegg [this message]
2023-03-22 20:00 ` Destructive pre-commit behaviour and "--all" 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMbUV8F8y62n5ud3AoWQak8J==Zrn7kzwTE7jCveVJEpfcqncg@mail.gmail.com' \
--to=rggjan@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).