Re: [PATCH] Teach applymbox to keep the Subject: line.

2005-08-18 Thread David Kågedal
Linus Torvalds [EMAIL PROTECTED] writes:

 On Wed, 17 Aug 2005, Jeff Garzik wrote:
 
 1) Fix applymbox such that it understands RFC822-valid Subject lines 
 which wrap across multiple text lines.

 It already should do this.

 2) Teach it to understand MIME, and not treat the MIME headers like part 
 of the message.

 But this one I really realyl disagree with.

 The fact is, anybody who doesn't edit the emails that come in is BROKEN. 
 There are two kinds of emails:

  - the nicely formatted ones where the author follows all the rules

This kind of email doesn't need MIME decoding anyway.

Unless they want to write something that doesn't fit in ASCII, as
discussed in another thread here.

But maybe you are only talking about MIME attachments, and not about
MIME content encodings?  We probably need to separate the two.

Note that I'm not really talking about your patch handling for Linux;
you are free to disallow my name in Linux patches if you want to.  But
I'd like to see a way to get rid of that limitation for other uses of
git.

-- 
David Kågedal

-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Teach applymbox to keep the Subject: line.

2005-08-18 Thread Sam Ravnborg
 (Also, with proper Signed-off-by: lines it's also always clear that 
 there were other people involved, and that the author of the patch is 
 different from the person who applied it).

I almost always handedit my mails and I find myself forgetting to add
Signed-off-by from time to time.
Is there a simple way to implment a trigger that can check that _I_
signed off the patch before applying it?

I prefer to add it myself rather than to have it added automatically -
but mayve thats you me being a bit mistrusting.

Btw. I'm a Cogito user if that makes a difference.
The only git- command I use today is git-applymbox.

Sam
-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Teach applymbox to keep the Subject: line.

2005-08-18 Thread Linus Torvalds


On Thu, 18 Aug 2005, Sam Ravnborg wrote:
 
 I almost always handedit my mails and I find myself forgetting to add
 Signed-off-by from time to time.
 Is there a simple way to implment a trigger that can check that _I_
 signed off the patch before applying it?

Well, Junio has been talking about adding commit hooks. I don't think
that's been done. The idea being that you could verify that the thing 
you're committing follows certain rules (no bad whitespace added in the 
diff, sign-offs in the messages, whatever).

That said, git-applypatch (which is what git-applymbox ends up calling) 
does not use the general git commit script. So it would have to have its 
own hook. The script is pretty easy to read, though: just look at 
git-applypatch, and notice that the last stages are:

...
git-apply --index $PATCHFILE || exit 1
tree=$(git-write-tree) || exit 1
echo Wrote tree $tree
commit=$(git-commit-tree $tree -p $(cat .git/HEAD)  $final) || exit 1
echo Committed: $commit
echo $commit  .git/HEAD

and that just before this thing you could easily add some sanity checking 
by hand. The commit message at that point is in the $final file, and the 
patch is obviously in $PATCHFILE, so you can verify either of those to 
your hearts content.

The only question is what the hook/trigger should look like. just put
something like

[ -x .git/hooks/applypatch-hook ] 
 .git/hooks/applypatch-hook $tree $PATCHFILE || exit

at the line before that git-apply perhaps? Then, you could install your 
own applypatch hook which looks at the message or the patch?

Linus
-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Teach applymbox to keep the Subject: line.

2005-08-18 Thread Junio C Hamano
Sam Ravnborg [EMAIL PROTECTED] writes:

 I prefer to add it myself rather than to have it added automatically -
 but mayve thats you me being a bit mistrusting.

 The only git- command I use today is git-applymbox.

If you did not have that add it myself preference, I would
have recommended the (not counting the flags) second parameter
to git-applymbox.

While we are on the topic of applymbox, currently it takes this
form:

$ applymbox [ -k ] [ -q ] (-c .dotest/msg_num | mail_archive) [Signoff_file]

It may make more sense to change it to:

applymbox [-k] [-q] [-s signoff] ( -c .dotest/msg_num | mbox... )


-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Teach applymbox to keep the Subject: line.

2005-08-17 Thread Linus Torvalds


On Tue, 16 Aug 2005, Junio C Hamano wrote:

 This is a companion patch to the previous format-patch fix.
 With -k, format-patch can be told not to remove the [PATCH] in
 the original commit, nor to add the [PATCH] on its own.

I think this might be the point in time to just make the [PATCH] prefix 
go away.

It made much more sense with BK than it does with git: since git keeps 
track of author and committer separately, you can always see when the 
committer wasn't the author of the change, which is what the [PATCH] 
thing was all about. 

In other words, at least for the kernel, [PATCH] was a marker that said 
the author didn't commit this directly. Git already has that information 
explicitly in the git data.

(Also, with proper Signed-off-by: lines it's also always clear that 
there were other people involved, and that the author of the patch is 
different from the person who applied it).

So I would personally not mind if we just made the [PATCH] prefix go 
away entirely, or perhaps had a separate flag to git-applymbox that told 
it to prepend a specific prefix to the Subject: line (which might not be 
[PATCH]  at all) defaulting to no prefix.

Linus

PS. Another historical reason for marking patches explicitly was that
people were worried that introducing BK would somehow make the old
patch-based submissions be second-class citizens. It was easy to make
statistics and show that at least half the real changes (as opposed to
merges) were still patch-based. So again, the PATCH marker had some 
historical relevance, but I don't think it matters any more.
-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Teach applymbox to keep the Subject: line.

2005-08-17 Thread Jeff Garzik


If someone is thus motivated, I have two requests in this area:

1) Fix applymbox such that it understands RFC822-valid Subject lines 
which wrap across multiple text lines.


2) Teach it to understand MIME, and not treat the MIME headers like part 
of the message.



-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html