Re: How to create the [PATCH 0/5] first email?

2012-09-23 Thread Jan Engelhardt

On Saturday 2012-09-15 19:08, Junio C Hamano wrote:

If you plan to use git send-email to send the final results out,
you should consider git send-email as your MUA in the quoted
paragraph.  And that will be very platform independent viewpoint to
see things from.

git format-patch -o my-series/ --cover-letter ...  would treat
my-series/ directory as MUA's drafts folder and prepares the
messages you would want to send out, and you can proof-read and edit
the files in there before telling your MUA to send them out, with
git send-email ... my-series/*.patch or something.

One can also send [0/n] with a normal MUA, and then use

 git send-email --in-reply-to 'messageid...@yourhost.no' commitrange


It's not like 0/n has to be emitted at the same second 1/n is :)

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


Re: How to create the [PATCH 0/5] first email?

2012-09-18 Thread Junio C Hamano
Jeff King p...@peff.net writes:

 But even without that, I still think format-patch is a reasonable time
 to do it. It is the time when I proof-read my commit message and patch
 in its final form, and think do I really want to send this?.

But it is not like I cannot sign off because I think it is still
iffy.

 seems to me like a reasonable time to make such a conscious decision to
 signoff (or not).

 But your point still stands; commit -s will not see through that
 official trick either ;-).

 Yes. :)

Actually, no.  commit -s does not have any need to see through it.

... hack hack hack ...
$ git commit -a -s
... editor opens, you see your Sign-off at the end, with
... the cursor sitting on the first line
... edit the title, move to the line below the Sign-off,
... and do the ---\n\n * comment thing.

And this survives rebase -i (but not format-patch | am for
obvious reasons).

So I take it back.  The time you do the git commit for the very
first time for this change that may need to be rerolled number of
times is the right time to say -s.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How to create the [PATCH 0/5] first email?

2012-09-18 Thread Jeff King
On Tue, Sep 18, 2012 at 12:11:58PM -0700, Junio C Hamano wrote:

 Jeff King p...@peff.net writes:
 
  But even without that, I still think format-patch is a reasonable time
  to do it. It is the time when I proof-read my commit message and patch
  in its final form, and think do I really want to send this?.
 
 But it is not like I cannot sign off because I think it is still
 iffy.

No, that is not the particular reason in my case, but I think I
explained other reasons why format-patch -s is not a wrong workflow.

  But your point still stands; commit -s will not see through that
  official trick either ;-).
 
  Yes. :)
 
 Actually, no.  commit -s does not have any need to see through it.
 
   ... hack hack hack ...
 $ git commit -a -s
 ... editor opens, you see your Sign-off at the end, with
 ... the cursor sitting on the first line
 ... edit the title, move to the line below the Sign-off,
 ... and do the ---\n\n * comment thing.
 
 And this survives rebase -i (but not format-patch | am for
 obvious reasons).

Yes, if your particular workflow is to signoff the very first time you
commit. But it would not work for:

 ... hack hack hack ...
 $ git commit -a
   ... make a note after --- ...

 ... hack hack hack ...
 ... OK, looks good, ready to signoff ...
 $ git commit --amend -s

So it can work, but it is workflow dependent, and in general is a little
flaky with the automagic signoff. You may want to signoff later for a
variety of reasons, not the least of which is that you forgot to type
-s the first time.

 So I take it back.  The time you do the git commit for the very
 first time for this change that may need to be rerolled number of
 times is the right time to say -s.

If you remember to type it. :)

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


Re: How to create the [PATCH 0/5] first email?

2012-09-18 Thread Junio C Hamano
Jeff King p...@peff.net writes:

 On Tue, Sep 18, 2012 at 12:11:58PM -0700, Junio C Hamano wrote:

 Jeff King p...@peff.net writes:
 
  But even without that, I still think format-patch is a reasonable time
  to do it. It is the time when I proof-read my commit message and patch
  in its final form, and think do I really want to send this?.
 
 But it is not like I cannot sign off because I think it is still
 iffy.

 No, that is not the particular reason in my case, but I think I
 explained other reasons why format-patch -s is not a wrong workflow.

Then I didn't read it.  What does do I really want to send this?
have anything to do with DCO in any case?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How to create the [PATCH 0/5] first email?

2012-09-18 Thread Philip Oakley

From: Junio C Hamano gits...@pobox.com

have anything to do with DCO in any case?


Junio,
What's DCO an abbreviation of?
Philip
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How to create the [PATCH 0/5] first email?

2012-09-18 Thread Jeff King
On Tue, Sep 18, 2012 at 12:47:36PM -0700, Junio C Hamano wrote:

  Jeff King p...@peff.net writes:
  
   But even without that, I still think format-patch is a reasonable time
   to do it. It is the time when I proof-read my commit message and patch
   in its final form, and think do I really want to send this?.
  
  But it is not like I cannot sign off because I think it is still
  iffy.
 
  No, that is not the particular reason in my case, but I think I
  explained other reasons why format-patch -s is not a wrong workflow.
 
 Then I didn't read it.  What does do I really want to send this?
 have anything to do with DCO in any case?

Because it is an excellent time to think about am I willing and able to
agree to the DCO? As I said, for me personally working on git.git, that
is not generally an issue. But I think it is perfectly reasonable for
somebody to work and commit in isolation, and then only decide on the
DCO during the sending phase (perhaps because they need to clear it with
their company's legal department or some such). In other words, it is
iffy at the time of commit might be exactly the reason for some people.

If you are responding to my that is not the particular reason in my
case, I will paraphrase the reason I gave earlier: I find it annoying
and pointless to type -s on every commit. We do not have
commit.signoff, but we do have format.signoff.

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


Re: How to create the [PATCH 0/5] first email?

2012-09-18 Thread Wesley J. Landaker
On Monday, September 17, 2012 17:49:39 Junio C Hamano wrote:
 Philip Oakley philipoak...@iee.org writes:
  I then applied it (using git am) to a temp branch to see what it
  produced, and could repeat the cycle until the patches looked right.
 
 That's another obvious and valid way to prepare your series.  It all
 depends on how comfortable you are to directly edit patches.  Some
 people fear it.  Some don't.  Some can do it with their eyes closed ;-).
 
  However, when it came to creating the series, with comments, I
  couldn't see a way of having my comments within my local commits, but
  preparing a patch series that would properly include the '---'
  separator.
 
 An unofficial trick that works is to write the
 
 ---
 
  * This is an additional comment
 
 
 yourself when running git commit.  That will be propagated to the
 output from format-patch.  You will have another --- in front of
 the diffstat, but nobody is hurt by that.

One thing I have done is to add the additional comments I want with git 
notes, then give the --notes option to format-patch or send-email.

Unfortunately, this sticks the notes right into the commit message section, 
because the --notes option is actually a diff option, not something 
format-patch knows about, so you have to make sure to manually move it.

But even so, I've found it a a nice way to track comments.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How to create the [PATCH 0/5] first email?

2012-09-17 Thread Philip Oakley

From: Junio C Hamano gits...@pobox.com

Philip Oakley philipoak...@iee.org writes:


Typically it will be placed in a MUA’s drafts folder, edited to add
timely commentary that should not go in the changelog after the three
dashes, and then sent as a message whose body, in our example, starts
with arch/arm config files were…. On the receiving end, readers 
can

save interesting patches in a UNIX mailbox and apply them with
git-am(1).

hides a multitude of implicit knowledge steps. Is there an extended
description of what that would mean from a platform independent
viewpoint? e.g. if the patches are separte files and an mbox is one
consolidated file, how to get from one to the other so that 'it' can 
be

sent by 'git send-mail'.


If you plan to use git send-email to send the final results out,
you should consider git send-email as your MUA in the quoted
paragraph.  And that will be very platform independent viewpoint to
see things from.


On git for windows (msysgit)n there were a couple of other steps I had 
to do https://git.wiki.kernel.org/index.php/MSysGit:UsingSendEmail as 
Outlooklook Express isn't really a suitable MUA ;-)  [noted for other 
list readers]




git format-patch -o my-series/ --cover-letter ...  would treat
my-series/ directory as MUA's drafts folder and prepares the
messages you would want to send out, and you can proof-read and edit
the files in there before telling your MUA to send them out, with
git send-email ... my-series/*.patch or something.



I hadn't picked up from the man page that the --cover-letter would do 
the [PATCH 0/n] - should it?



I'm also missing an understanding of the preparation stage where one
tries to tidy up the various commit messages becaue they weren't
explicit, specfic nor concise enough,...


Many people usually do rebase -i until perfection and then a
single final invocation of format-patch.  Of course, the final
can and should further be proof-read and it is fine to do typofixes
in the format-patch output files without going back to the commits
before sending them out.


I did an initial rebase to correct a few obvious mistakes (e.g. an extra 
file that had crept in), but then, after some false starts, used

   git format-patch pu --stdout  fix_Docs.patch
to get a single file I could inspect and refine for both the commit 
messages and content.


I then applied it (using git am) to a temp branch to see what it 
produced, and could repeat the cycle until the patches looked right.



...so I suspect that there is an
implicit `git format-patch` - `git am` loop of sharpening the mbox
patches before submission to the list that I'm missing. Has this
described somewhere?

--


However, when it came to creating the series, with comments, I couldn't 
see a way of having my comments within my local commits, but preparing a 
patch series that would properly include the '---' separator.


Is there a way of getting format-patch to change some line break 
sequence (within the commit message) to the '---' three dashes patch 
break suitable for submission to the list?


Philip



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


Re: How to create the [PATCH 0/5] first email?

2012-09-17 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes:

 I then applied it (using git am) to a temp branch to see what it
 produced, and could repeat the cycle until the patches looked right.

That's another obvious and valid way to prepare your series.  It all
depends on how comfortable you are to directly edit patches.  Some
people fear it.  Some don't.  Some can do it with their eyes closed ;-).

 However, when it came to creating the series, with comments, I
 couldn't see a way of having my comments within my local commits, but
 preparing a patch series that would properly include the '---'
 separator.

An unofficial trick that works is to write the

---

 * This is an additional comment


yourself when running git commit.  That will be propagated to the
output from format-patch.  You will have another --- in front of
the diffstat, but nobody is hurt by that.

But when doing a big series that deserves a cover letter [PATCH 0/n],
you will use editor on the output from format-patch anyway, and I
find it simpler to do the follow-on comments at that point myself.

Personal preferences vary, so whatever makes you feel comfortable
with and works well for you is good.

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


Re: How to create the [PATCH 0/5] first email?

2012-09-17 Thread Junio C Hamano
Jeff King p...@peff.net writes:

 On Mon, Sep 17, 2012 at 04:49:39PM -0700, Junio C Hamano wrote:

  However, when it came to creating the series, with comments, I
  couldn't see a way of having my comments within my local commits, but
  preparing a patch series that would properly include the '---'
  separator.
 
 An unofficial trick that works is to write the
 
 ---
 
  * This is an additional comment
 
 
 yourself when running git commit.  That will be propagated to the
 output from format-patch.  You will have another --- in front of
 the diffstat, but nobody is hurt by that.

 But note that using format-patch -s will break; it puts the sign-off
 below the ---.

I think format-patch -s is a workflow mistake in the first place.
You should be doing the sign-off the commit when you commit in the
first place.  It is not like I cannot sign off because I think it
is still iffy or anything.

But your point still stands; commit -s will not see through that
official trick either ;-).

 But when doing a big series that deserves a cover letter [PATCH 0/n],
 you will use editor on the output from format-patch anyway, and I
 find it simpler to do the follow-on comments at that point myself.

 Me too (actually, I load it all into mutt and then comment on each as I
 send them out, but it amounts to the same thing, seeing as how my MUA
 just invokes $EDITOR when I edit a mail).
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


How to create the [PATCH 0/5] first email?

2012-09-15 Thread Philip Oakley

The git format-patch allows numbered patches to be created, however I'm
not sure how folk generate the initial 0/n patch. Which of the various
options should I be using?

Also, being on windows, the various 'mbox' and 'MUA' discussions are new
to me, so the format-patch step where :-

Typically it will be placed in a MUA’s drafts folder, edited to add
timely commentary that should not go in the changelog after the three
dashes, and then sent as a message whose body, in our example, starts
with arch/arm config files were…. On the receiving end, readers can
save interesting patches in a UNIX mailbox and apply them with
git-am(1).

hides a multitude of implicit knowledge steps. Is there an extended
description of what that would mean from a platform independent
viewpoint? e.g. if the patches are separte files and an mbox is one
consolidated file, how to get from one to the other so that 'it' can be
sent by 'git send-mail'.

I'm also missing an understanding of the preparation stage where one
tries to tidy up the various commit messages becaue they weren't
explicit, specfic nor concise enough, so I suspect that there is an
implicit `git format-patch` - `git am` loop of sharpening the mbox
patches before submission to the list that I'm missing. Has this 
described somewhere?


Philip Oakley

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


Re: How to create the [PATCH 0/5] first email?

2012-09-15 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes:

 Typically it will be placed in a MUA’s drafts folder, edited to add
 timely commentary that should not go in the changelog after the three
 dashes, and then sent as a message whose body, in our example, starts
 with arch/arm config files were…. On the receiving end, readers can
 save interesting patches in a UNIX mailbox and apply them with
 git-am(1).

 hides a multitude of implicit knowledge steps. Is there an extended
 description of what that would mean from a platform independent
 viewpoint? e.g. if the patches are separte files and an mbox is one
 consolidated file, how to get from one to the other so that 'it' can be
 sent by 'git send-mail'.

If you plan to use git send-email to send the final results out,
you should consider git send-email as your MUA in the quoted
paragraph.  And that will be very platform independent viewpoint to
see things from.

git format-patch -o my-series/ --cover-letter ...  would treat
my-series/ directory as MUA's drafts folder and prepares the
messages you would want to send out, and you can proof-read and edit
the files in there before telling your MUA to send them out, with
git send-email ... my-series/*.patch or something.

 I'm also missing an understanding of the preparation stage where one
 tries to tidy up the various commit messages becaue they weren't
 explicit, specfic nor concise enough,...

Many people usually do rebase -i until perfection and then a
single final invocation of format-patch.  Of course, the final
can and should further be proof-read and it is fine to do typofixes
in the format-patch output files without going back to the commits
before sending them out.

 ...so I suspect that there is an
 implicit `git format-patch` - `git am` loop of sharpening the mbox
 patches before submission to the list that I'm missing. Has this 
 described somewhere?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html