From: Junio C Hamano <hidden> Date: 2016-06-15 22:43:01
"Michael S. Tsirkin" [off-list ref] writes:
quoted
quoted
3. if I want to have some text coming *before* the commit
message ignored, there's no way to do this
4. there's no way to override the subject from within the message
(like there is with author/From line)
How about this?
Looks good. What about 3?
When e-mailed message has garbage at the beginning (e.g. "Hi!"),
git users can either run "commit --amend" immiediately after
"git am", or edit the mbox with editor before running
"applymbox", so the need has not been felt much us, and that is
the primary reason why it is not there. Additionally we do not
think it is particularly a good practice to have "cover letters"
at the top (cf. $gmane/5418), so it was never high priority for
us to add that feature to encourage such a practice.
Having said that, on top of the recent work by Don Zickus on
mailinfo, you _could_ add support for scissors "^-- >8 --$" if
you want.
quoted
Also check t5100 and its sample mailbox,
especially the "third patch" from A U Thor, which I forwarded
with the subject "another patch".
It's funny ... but what should I look at there, specifically?
It is an example that you can override Subject: (#4 above).
From: Michael S. Tsirkin <hidden> Date: 2016-06-15 22:43:02
Quoting Junio C Hamano [off-list ref]:
Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message
"Michael S. Tsirkin" [off-list ref] writes:
quoted
quoted
quoted
3. if I want to have some text coming *before* the commit
message ignored, there's no way to do this
4. there's no way to override the subject from within the message
(like there is with author/From line)
How about this?
Looks good. What about 3?
When e-mailed message has garbage at the beginning (e.g. "Hi!"),
git users can either run "commit --amend" immiediately after
"git am",
This one would overwrite the authorship information though,
would it not? I actually wished several times for an --amend-message
commit flag that would only edit the message, preserving the author
(and possibly date?) metadata.
Of course, I simply copy the author and pass it in --author,
but it's somewhat awkward to do. Do others notice this?
*Maybe* git can be even smarter, and notice that only
commit message has changed, and preserve the author automatically
in this case? I haven't looked at how hard that would be to do.
<rant>
I actually find it awkward that author/summary information is never
shown during git commit - sometimes one does git commit
on a machine where GIT_AUTHOR_EMAIL has not been setup
correctly, and the result often is mst@mst-desktop.(none).
Or people sometimes forget that the first line will show up
in the pretty=short summary and the result is that what
ends up being there is just 2 first lines of the long description.
One has to remember to always do git log --pretty=short
after commit to verify that one did get these details right.
Ideas:
- Maybe have git-commit display shortlog summary for commit just created?
- Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted
commit message, and let the user edit them?
</rant>
or edit the mbox with editor before running
"applymbox", so the need has not been felt much us, and that is
the primary reason why it is not there. Additionally we do not
think it is particularly a good practice to have "cover letters"
at the top (cf. $gmane/5418), so it was never high priority for
us to add that feature to encourage such a practice.
Having said that, on top of the recent work by Don Zickus on
mailinfo, you _could_ add support for scissors "^-- >8 --$" if
you want.
OK, I thought about this a bit - if the message includes a
cover letter, I think it's also likely to have an incorrect
subject too. So how about simply ignoring text before
Subject:/From: lines? This makes more sense, for me, than
inventing yet another git-specific convention. Does this for you?
--
MST
From: Jeff King <hidden> Date: 2016-06-15 22:43:02
Signed-off-by: Jeff King <redacted>
---
On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:
- Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted
commit message, and let the user edit them?
Personally I think it's just clutter, but hey, it's off by default. Of
course what is the chance that you've turned on status.showauthor in
your ~/.gitconfig, but you don't have your identity set up properly? :)
Junio, this is somewhat tongue in cheek, but if people like it, please
take it.
Documentation/config.txt | 5 +++++
wt-status.c | 10 ++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
@@ -537,6 +537,11 @@ showbranch.default:: The default set of branches for gitlink:git-show-branch[1]. See gitlink:git-show-branch[1].+status.showauthor::+ If set to true, the output of git-status and the template used+ for git-commit will show the author's name and email address.+ Defaults to false.+ tar.umask:: By default, gitlink:git-tar-tree[1] sets file and directories modes to 0666 or 0777. While this is both useful and acceptable for projects
From: Michael S. Tsirkin <hidden> Date: 2016-06-15 22:43:02
Quoting Jeff King [off-list ref]:
Subject: [PATCH] wt-status: show author info if status.showauthor is set
Signed-off-by: Jeff King <redacted>
---
On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:
quoted
- Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted
commit message, and let the user edit them?
Personally I think it's just clutter, but hey, it's off by default. Of
course what is the chance that you've turned on status.showauthor in
your ~/.gitconfig, but you don't have your identity set up properly? :)
The point is that *someone else* can have showauthor set up in .gitconfig,
and then he'll be able to use git commit --amend to fix up
the identity without using --author explicitly.
--
MST
From: Shawn O. Pearce <hidden> Date: 2016-06-15 22:43:02
"Michael S. Tsirkin" [off-list ref] wrote:
quoted
Quoting Jeff King [off-list ref]:
On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:
quoted
- Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted
commit message, and let the user edit them?
Personally I think it's just clutter, but hey, it's off by default. Of
course what is the chance that you've turned on status.showauthor in
your ~/.gitconfig, but you don't have your identity set up properly? :)
The point is that *someone else* can have showauthor set up in .gitconfig,
and then he'll be able to use git commit --amend to fix up
the identity without using --author explicitly.
Hmm. Actually I'd like to be able to set (or change) the author
using a From: line, much like email headers. Especially in the case
of git-commit --amend, as sometimes I make a new commit as myself,
then realize *after* I've quit the editor that the patch really
came from someone else, and I should record the right author.
And no, the patch wasn't really a patch. It was a set of files
from the user that I manually copy in, then commit. Though I have
to wonder why I keep doing that as said user also does use the same
Git repository as me... and edits and commits other files on their
own just fine... ;-)
--
Shawn.
From: Jakub Narebski <hidden> Date: 2016-06-15 22:43:03
Jeff King wrote:
On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:
quoted
- Maybe put Author: (or From:? and maybe Subject:?) line in the pre-formatted
commit message, and let the user edit them?
Personally I think it's just clutter, but hey, it's off by default. Of
course what is the chance that you've turned on status.showauthor in
your ~/.gitconfig, but you don't have your identity set up properly? :)
It can be turned on in /etc/gitconfig (and of course user.name cannot).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git