threads / discuss / 16773

git-format-patch patch

Subject: git-format-patch patch

## tl;dr

18 messages between Dec 17, 2008 and Dec 20, 2008.

replies: 17people: 6as markdown or json

jidanni@jidanni.org· Dec 17, 2008, 20:53 UTC · lore
I'm still reading the manpage about submitting proper patches, so for now:
*** /tmp/git-format-patch.txt	2008-12-18 04:41:34.050800884 +0800
--- /tmp/git-format-patchNEW.txt	2008-12-18 04:46:25.738801367 +0800
***************
*** 127,133 ****
  --in-reply-to=Message-Id::
  	Make the first mail (or all the mails with --no-thread) appear as a
  	reply to the given Message-Id, which avoids breaking threads to
! 	provide a new patch series.
  
  --ignore-if-in-upstream::
  	Do not include a patch that matches a commit in
--- 127,134 ----
  --in-reply-to=Message-Id::
  	Make the first mail (or all the mails with --no-thread) appear as a
  	reply to the given Message-Id, which avoids breaking threads to
! 	provide a new patch series. Generates coresponding References and
! 	In-Reply-To headers. Angle brackets around <Message-Id> are optional.
  
  --ignore-if-in-upstream::
  	Do not include a patch that matches a commit in
Miklos Vajna· Dec 17, 2008, 21:55 UTC · re: jidanni@jidanni.org · lore

Re: git-format-patch patch

On Thu, Dec 18, 2008 at 04:53:42AM +0800, jidanni@jidanni.org wrote:
> I'm still reading the manpage about submitting proper patches, so for now:
It is not a manual page, it lives under Documentation/SubmittingPatches.
Problems with the current patch:
- It is not a unidiff.
- No signoff
- No commit message
Hope this helps. :)
Jeff King· Dec 18, 2008, 08:35 UTC · re: jidanni@jidanni.org · lore

Re: git-format-patch patch

On Thu, Dec 18, 2008 at 04:53:42AM +0800, jidanni@jidanni.org wrote:
> I'm still reading the manpage about submitting proper patches, so for now:

It looks like you didn't even use git to create it (since it is a context diff and the filenames are obviously bogus). If you are committed to improving git, then surely using it is not so bad? :)

Try cloning git://git.kernel.org/pub/scm/git/git.git, or if you just have a tarball, at least do "cd /path/to/git && git init && git add . && git commit -m 'import from git version $whatever'". Then you can make your changes and have git track them and prepare them for submission.

Then read Documentation/SubmittingPatches, which covers some of the basics. Besides the format not being applicable by regular git tools:

 - there is no commit message describing the changes, nor the reasoning
   behind them
 - it was not sent to the maintainer (who does read the list, but does
   not always read every message).
Show 5 quoted lines
>   --in-reply-to=Message-Id::
>   	Make the first mail (or all the mails with --no-thread) appear as a
>   	reply to the given Message-Id, which avoids breaking threads to
> ! 	provide a new patch series. Generates coresponding References and
> ! 	In-Reply-To headers. Angle brackets around <Message-Id> are optional.
As for the change itself, it looks reasonable to me.
-Peff
Junio C Hamano· Dec 18, 2008, 08:42 UTC · re: Jeff King · lore

Re: git-format-patch patch

Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> ... Besides the format not being applicable by regular git tools:
>
>  - there is no commit message describing the changes, nor the reasoning
>    behind them
>
>  - it was not sent to the maintainer (who does read the list, but does
>    not always read every message).

Actually, it would probably be a good idea not to send your first patch to me and instead to request for comments from the list ;-)n

The worst offence of the message was the choice of bad Subject that strongly encouraged anyone to skip it. Consider:

	Subject: [PATCH] document "format-patch --in-reply-to" better
or something like that.
jidanni@jidanni.org· Dec 19, 2008, 19:12 UTC · re: Junio C Hamano · lore

[PATCH] Clarify git-format-patch --in-reply-to

Signed-off-by: jidanni <jidanni@jidanni.org>
diff --git a/git-format-patch.txt b/git-format-patch.txt
index ee27eff..04958de 100644
--- a/git-format-patch.txt
+++ b/git-format-patch.txt
@@ -130 +130,2 @@ include::diff-options.txt[]
-	provide a new patch series.
+	provide a new patch series. Generates coresponding References and
+	In-Reply-To headers. Angle brackets around <Message-Id> are optional.
-- 
1.5.6.5
Nanako Shiraishi· Dec 19, 2008, 21:51 UTC · re: jidanni@jidanni.org · lore

Re: [PATCH] Clarify git-format-patch --in-reply-to

Quoting jidanni@jidanni.org:
> Signed-off-by: jidanni <jidanni@jidanni.org>
I understand that "Signed-off-by" is about code ownership and thought that the official history prefers to have a real name instead of a pseudonym. Perhaps you would want to say "Dan Jacobson <jidanni@jidanni.org>" or something similar?
-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Miklos Vajna· Dec 19, 2008, 22:22 UTC · re: Nanako Shiraishi · lore

Re: [PATCH] Clarify git-format-patch --in-reply-to

On Sat, Dec 20, 2008 at 06:51:35AM +0900, Nanako Shiraishi <nanako3@lavabit.com> wrote:
> I understand that "Signed-off-by" is about code ownership and thought
> that the official history prefers to have a real name instead of a
> pseudonym. Perhaps you would want to say "Dan Jacobson
> <jidanni@jidanni.org>" or something similar?

I don't think it's a requirement, see 2b36b14 for example. Though yes, in general it's considered childish to hide behind a nickname, instead of using your real name. (ESR has a section about this in the "hacker howto".)

Junio C Hamano· Dec 19, 2008, 23:07 UTC · re: Miklos Vajna · lore

Re: [PATCH] Clarify git-format-patch --in-reply-to

Miklos Vajna <vmiklos@frugalware.org> writes:
Show 10 quoted lines
> On Sat, Dec 20, 2008 at 06:51:35AM +0900, Nanako Shiraishi <nanako3@lavabit.com> wrote:
>> I understand that "Signed-off-by" is about code ownership and thought
>> that the official history prefers to have a real name instead of a
>> pseudonym. Perhaps you would want to say "Dan Jacobson
>> <jidanni@jidanni.org>" or something similar?
>
> I don't think it's a requirement, see 2b36b14 for example. Though yes,
> in general it's considered childish to hide behind a nickname, instead
> of using your real name. (ESR has a section about this in the "hacker
> howto".)

An earlier mistake does not justify adding new ones. Besides, I think ALASCM once revealed his "real name" on the list.

Miklos Vajna· Dec 20, 2008, 00:20 UTC · re: Junio C Hamano · lore

[PATCH] SubmittingPatches: mention the usage of real name in Signed-off-by: lines

Especially with something that is supposed to hopefully have some legal value down the line if somebody starts making noises, it really would be nice to have a real person to associate things with. Suggest this in the SubmittingPatches document.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Fri, Dec 19, 2008 at 03:07:25PM -0800, Junio C Hamano <gitster@pobox.com> wrote:
> An earlier mistake does not justify adding new ones.  Besides, I think
> ALASCM once revealed his "real name" on the list.

Ah, true ($gmane/7946). Then maybe something like this would be good to have? The commit message is mostly copy&paste from Linus' message.

 Documentation/SubmittingPatches |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index f0295c6..530aa25 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -222,6 +222,9 @@ D-C-O.  Indeed you are encouraged to do so.  Do not forget to
 place an in-body "From: " line at the beginning to properly attribute
 the change to its true author (see (2) above).
 
+Also notice that a real name is used in the Signed-off-by: line. Please
+don't be childish and don't hide your real name.
+
 Some people also put extra tags at the end.
 
 "Acked-by:" says that the patch was reviewed by the person who
-- 
1.6.1.rc1.35.gae26e.dirty
Junio C Hamano· Dec 20, 2008, 00:39 UTC · re: Miklos Vajna · lore

Re: [PATCH] SubmittingPatches: mention the usage of real name in Signed-off-by: lines

Miklos Vajna <vmiklos@frugalware.org> writes:
> Especially with something that is supposed to hopefully have some legal
> value down the line if somebody starts making noises, it really would be
> nice to have a real person to associate things with.

I would agree with the reasoning, but do we have to say "childish" just to be derogatory? I think that is counterproductive.

Miklos Vajna· Dec 20, 2008, 00:52 UTC · re: Junio C Hamano · lore

[PATCH] SubmittingPatches: mention the usage of real name in Signed-off-by: lines

Especially with something that is supposed to hopefully have some legal value down the line if somebody starts making noises, it really would be nice to have a real person to associate things with. Suggest this in the SubmittingPatches document.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Fri, Dec 19, 2008 at 04:39:31PM -0800, Junio C Hamano <gitster@pobox.com> wrote:
> I would agree with the reasoning, but do we have to say "childish"
> just to
> be derogatory?  I think that is counterproductive.
True.
 Documentation/SubmittingPatches |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index f0295c6..ba07c8c 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -222,6 +222,9 @@ D-C-O.  Indeed you are encouraged to do so.  Do not forget to
 place an in-body "From: " line at the beginning to properly attribute
 the change to its true author (see (2) above).
 
+Also notice that a real name is used in the Signed-off-by: line. Please
+don't hide your real name.
+
 Some people also put extra tags at the end.
 
 "Acked-by:" says that the patch was reviewed by the person who
-- 
1.6.1.rc1.35.gae26e.dirty
jidanni@jidanni.org· Dec 19, 2008, 22:27 UTC · re: Nanako Shiraishi · lore

Re: [PATCH] Clarify git-format-patch --in-reply-to

NS> I understand that "Signed-off-by" is about code ownership and NS> thought that the official history prefers to have a real name NS> instead of a pseudonym. Perhaps you would want to say "Dan NS> Jacobson <jidanni@jidanni.org>" or something similar?

Thanks but I want to be http://zh.wikipedia.org/wiki/積丹尼 (which is what all my ID cards say) and not any http://en.wikipedia.org/wiki/Jacobson , http://en.wikipedia.org/wiki/Jacobsen . I've completed a name-change operation, and prefer to use my post-op name. Childish? Bingo.

Miklos Vajna· Dec 19, 2008, 22:33 UTC · re: jidanni@jidanni.org · lore

Re: [PATCH] Clarify git-format-patch --in-reply-to

On Sat, Dec 20, 2008 at 06:27:28AM +0800, jidanni@jidanni.org wrote:
Show 9 quoted lines
> NS> I understand that "Signed-off-by" is about code ownership and
> NS> thought that the official history prefers to have a real name
> NS> instead of a pseudonym. Perhaps you would want to say "Dan
> NS> Jacobson <jidanni@jidanni.org>" or something similar?
> 
> Thanks but I want to be http://zh.wikipedia.org/wiki/?????????
> (which is what all my ID cards say) and not any
> http://en.wikipedia.org/wiki/Jacobson , http://en.wikipedia.org/wiki/Jacobsen .
> I've completed a name-change operation, and prefer to use my post-op name.
Who said you can't use utf-8 chars in the author field?

See http://repo.or.cz/w/git.git?a=commit;h=6b312253cb6e8b21e74882a3ae0972fac1290244 for example.

jidanni@jidanni.org· Dec 19, 2008, 23:20 UTC · re: Miklos Vajna · lore

just can't live without a user.name

Actually it's all git's fault for not working if user.name is null or unset. Ask yourself, would email programs panic if all there was only bob@example.org in a header?

> But we need a user.name for legal reasons.
But there should be a way to override it, in case those laws don't apply.
I want
  Author: jidanni@jidanni.org
like my email address above. But the closest I can get is
  Author: jidanni <jidanni@jidanni.org>
And then there are some programs that need
$ git config --global user.name $USER
just to get that, else the springs come loose:
$ git-format-patch -s
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident  <jidanni@jidanni.org
> not allowed
Miklos Vajna· Dec 20, 2008, 00:08 UTC · re: jidanni@jidanni.org · lore

Re: just can't live without a user.name

On Sat, Dec 20, 2008 at 07:20:56AM +0800, jidanni@jidanni.org wrote:
> Actually it's all git's fault for not working if user.name is null or
> unset.
Please don't turn this thread into a flame.

If I understand correctly, you said you hide your name because you can't use your real name and using some limited ASCII replacement makes you unhappy.

I said you can use utf-8 in the user.name field and showed you an example about this.

Instead of replying to this, you just did not quote any parts of my message, but started to talk about you don't want to show your real name at all. What's the point of doing so?

Junio C Hamano· Dec 20, 2008, 00:18 UTC · re: Miklos Vajna · lore

Re: just can't live without a user.name

Miklos Vajna <vmiklos@frugalware.org> writes:
Show 5 quoted lines
> On Sat, Dec 20, 2008 at 07:20:56AM +0800, jidanni@jidanni.org wrote:
>> Actually it's all git's fault for not working if user.name is null or
>> unset.
>
> Please don't turn this thread into a flame.

Just pay attention to messages in which he says something that adds value to the discussion, and simply ignore the rest.

jidanni@jidanni.org· Dec 20, 2008, 00:36 UTC · re: Miklos Vajna · lore

Re: just can't live without a user.name

MV> I said you can use utf-8 in the user.name field and showed you an example But I want to use null or (my favorite string of) ASCII. Anyway no program so far on UNIX broke with just $ grep $USER /etc/passwd jidanni:x:1000:1000:,,,:/home/jidanni:/bin/bash except git.

Bernt Hansen· Dec 19, 2008, 22:01 UTC · re: jidanni@jidanni.org · lore

Re: [PATCH] Clarify git-format-patch --in-reply-to

jidanni@jidanni.org writes:
Show 9 quoted lines
> Signed-off-by: jidanni <jidanni@jidanni.org>
>
> diff --git a/git-format-patch.txt b/git-format-patch.txt
> index ee27eff..04958de 100644
> --- a/git-format-patch.txt
> +++ b/git-format-patch.txt
> @@ -130 +130,2 @@ include::diff-options.txt[]
> -	provide a new patch series.
> +	provide a new patch series. Generates coresponding References and
                                              ^^^^^^^^^^^^
Typo                                          corresponding
> +	In-Reply-To headers. Angle brackets around <Message-Id> are optional.
> -- 
> 1.5.6.5

← back to recent threads