Skip to contentSkip to conversation

git-format-patch patch

PATCH In review [email protected] 6 participants 18 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 1 line · On Thu, Dec 18, 2008 at 04:53:42AM +0800, [email protected] 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. :)

#2 lore raw
In reply to [email protected]
Quoted 1 line · On Thu, Dec 18, 2008 at 04:53:42AM +0800, [email protected] 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).

Quoted 5 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

#3 lore raw
Quoted 7 lines · Jeff King

... 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.

#4 lore raw

PATCH 1/1 Clarify git-format-patch --in-reply-to

git-format-patch.txt +2 -1
index ee27eff..04958de 100644
@@ -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.
Signature · 1 line
1.5.6.5
#5 lore raw

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

Quoting [email protected]:

Quoted 1 line

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 <[email protected]>" or something similar?

Signature · 2 lines
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
#6 lore raw

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

Quoted 4 lines · Nanako Shiraishi

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 <[email protected]>" 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".)

#7 lore raw

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

Quoted 10 lines · Miklos Vajna
Quoted 4 lines · Nanako Shiraishi

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 <[email protected]>" 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.

#8 lore raw

PATCH 1/1 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.

---

Quoted 2 lines · Junio C Hamano

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(-)
Documentation/SubmittingPatches +3 -0
index f0295c6..530aa25 100644
@@ -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
Signature · 1 line
1.6.1.rc1.35.gae26e.dirty
#9 lore raw

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

Quoted 3 lines · Miklos Vajna

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.

#10 lore raw

PATCH 1/1 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.

---

Quoted 3 lines · Junio C Hamano

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(-)
Documentation/SubmittingPatches +3 -0
index f0295c6..ba07c8c 100644
@@ -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
Signature · 1 line
1.6.1.rc1.35.gae26e.dirty
#11 lore raw

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

In reply to Nanako Shiraishi

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 <[email protected]>" 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.

#12 lore raw

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

Quoted 9 lines · On Sat, Dec 20, 2008 at 06:27:28AM +0800, [email protected] wrote:

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 <[email protected]>" 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.

#13 lore raw

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 [email protected] in a header?

Quoted 1 line

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: [email protected]
like my email address above. But the closest I can get is
Author: jidanni <[email protected]>
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 "[email protected]"
  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  <[email protected]
Quoted 1 line

not allowed

#14 lore raw

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

Quoted 2 lines · On Sat, Dec 20, 2008 at 07:20:56AM +0800, [email protected] 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?

#15 lore raw

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

Quoted 5 lines · Miklos Vajna
Quoted 2 lines · On Sat, Dec 20, 2008 at 07:20:56AM +0800, [email protected] 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.

#16 lore raw

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

In reply to Miklos Vajna

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.
#17 lore raw

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

In reply to [email protected]

git-format-patch.txt include::diff-options.txt[] · line 130

Quoted 9 lines · [email protected] writes:
git-format-patch.txt +1 -1
index ee27eff..04958de 100644
@@ -130 +130,2 @@ include::diff-options.txt[]
-	provide a new patch series.
+	provide a new patch series. Generates coresponding References and
                                              ^^^^^^^^^^^^

Typo corresponding

Quoted 3 lines
git-format-patch.txt +1 -0
+	In-Reply-To headers. Angle brackets around <Message-Id> are optional.
Signature · 1 line
1.5.6.5