"Michael S. Tsirkin" <mst@xxxxxxxxxxxxxxxxxx> writes: > Quoting Junio C Hamano <junkio@xxxxxxx>: > Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message > >> "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxxxxxx> writes: >> >> >> > 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? People sometimes say something like: From: Quim K Holland <qkholland@xxxxxxx> Date: Wed, 4 Apr 2007 09:02:13 +0300 Subject: [PATCH] Fix frobnitz while nitfol is in use Message-Id: <20070404060213.GB31984@xxxxxxxxxxxxxx> Earlier Sloof Lirpa reported that frobnitz feature has problems when nitfol is running background in this message: From: Sloof Lirpa <sitemaster@xxxxxxx> Subject: [BUG] frobnitz garbles its output Message-Id: <20070403060213.GB31984@xxxxxxxxxxxxx> Upon closer inspection, the problem is caused by filfre function firing up prematurely because nitfol process grabs semaphore and never releases it. Here is a patch to fix this issue... Signed-off-by: Quim K Holland <qkholland@xxxxxxx> --- diff --git a/... b/... And that is why we do not even pick up the From: and stuff in the middle of the message. We might be able to convince people to adopt a convention to use an explicit mark to signal the end of cover letter (or maybe make it an option in .git/config), but one thing we do not absolutely want to do is to pick up "^(From|Date|Subject): " from any random place in the middle of message, let alone discarding what comes before them. That is, something like the following might be acceptable instead: From: Sloof Lirpa <sitemaster@xxxxxxx> Subject: [BUG] frobnitz garbles its output Message-Id: <20070403060213.GB31984@xxxxxxxxxxxxx> Quim K Holland's patch fixes the problem I reported earlier, so I am forwarding his patch. Please apply. -- >8 -- From: Quim K Holland <qkholland@xxxxxxx> Date: Wed, 4 Apr 2007 09:02:13 +0300 Subject: [PATCH] Fix frobnitz while nitfol is in use Message-Id: <20070404060213.GB31984@xxxxxxxxxxxxxx> Earlier Sloof Lirpa reported that frobnitz feature has problems when nitfol is running background in this message: Upon closer inspection, the problem is caused by filfre function firing up prematurely because nitfol process grabs semaphore and never releases it. Here is a patch to fix this issue... Signed-off-by: Quim K Holland <qkholland@xxxxxxx> --- diff --git a/... b/... - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html