Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-08-15 Thread Simon Glass
Hi Josh,

On 1 August 2016 at 12:37, Josh Triplett  wrote:
> On Mon, Aug 01, 2016 at 09:14:54AM -0600, Stephen Warren wrote:
>> On 07/29/2016 12:40 AM, Josh Triplett wrote:
>> > I'd like to announce a project I've been working on for a while:
>> >
>> > git-series provides a tool for managing patch series with git, tracking
>> > the "history of history". git series tracks changes to the patch series
>> > over time, including rebases and other non-fast-forwarding changes. git
>> > series also tracks a cover letter for the patch series, formats the
>> > series for email, and prepares pull requests.
>>
>> Just as an FYI, I wouldn't be surprised if there's some overlap, or
>> potential for merging of tools, between this tool and the "patman" tool
>> that's part of the U-Boot source tree:
>>
>> http://git.denx.de/?p=u-boot.git;a=blob;f=tools/patman/README;h=e36857dedea1d0dbafa41732aaf9bf0988d63f38;hb=HEAD
>
> Interesting tool; thanks for the link.
>
> As far as I can tell from that documentation, patman doesn't track old
> versions of a patch series; you rebase to modify patches or change
> patman tags (embedded in commit messages), and nothing preserves the
> previous version.  And it tracks the cover letter and similar in one of
> the commit messages in the series, so previous versions of that don't
> get saved either.  If you wanted to track the history of your changes,
> you'd have to use branch names or similar.

That's right. Normally you would keep the old branch around, or tag
it. Of course old branches are often based on older versions the
upstream repo, so they are not that useful for diiff, etc. But the
normal procedure when updating a series to a new version is:

git checkout -b wibble-v2 wibble
git rebase upstream/master
git commit --amend
# Edit commit to add 'Series-version: 2', update cover letter etc.

Of course any change log is preserved when you move to v3, since you
just add more 'Series-changes:' tags. The old version of the cover
letter, and the old version of the commits can be preserved with 'git
tag'.

>
> In addition, tracking metadata in commit messages only works with a
> patches-by-mail workflow where the messages get processed when
> generating patches; that doesn't work for please-pull workflows.

Can you explain what a please-pull workflow looks like, and what tags
are expected?

>
> patman does have quite a few interesting ideas, though.  git-series
> needs some way of handling To/Cc addresses for patches and the cover
> letter (beyond just scripts/get_maintainer.pl), and more automatic
> handling of series versioning (v2, v3, ...) and associated series
> changelogs.  Suggestions welcome.

Patman builds the cover letter change lists from the commits. The main
point of patman is to automate the error-prone process of submitting a
perfectly formed patch series.

In particular, patman requires no change to the normal workflow that
people use with git.

>
> - Josh Triplett

Regards,
Simon
--
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: storing cover letter of a patch series?

2015-09-17 Thread Simon Glass
Hi Jacob,

On 11 September 2015 at 02:30, Chris Packham  wrote:
> On Fri, Sep 11, 2015 at 4:28 AM, Jacob Keller  wrote:
>> Hey,
>>
>> does anyone know of any tricks for storing a cover letter for a patch
>> series inside of git somehow? I'd guess the only obvious way currently
>> is to store it at the top of the series as an empty commit.. but this
>> doesn't get emailed *as* the cover letter...
>>
>> Is there some other way? Would others be interested in such a feature?
>>
>> I get very annoyed when I've written a nice long patch cover letter in
>> vim before an email and then realize I should fix something else up,
>> or accidentally cancel it because I didn't use the write "To:" address
>> or something..
>>
>> I really think it should be possible to store something somehow as a
>> blob that could be looked up later. Even if this was a slightly more
>> manual process that would be helpful to store the message inside git
>> itself.
>>
>> In addition, this would help re-rolls since it would mean if I go back
>> to a topic and re-roll it I can just update the message. If it were
>> properly stored in my local history that would also mean I could see
>> revisions on it.
>>
>> Any thoughts on how to do this?
>>
>
> A bit of a plug for patman[1] which the u-boot project uses (although
> there's nothing u-boot specific about it). It lets you put the cover
> letter and other meta information in the commit messages as you go
> then will extract that information and generate a cover letter and
> clean patches. As of fairly recently it's also installable as a
> standalone application.
>
> --
> [1] - http://git.denx.de/?p=u-boot.git;a=blob;f=tools/patman/README

If you do end up trying it out I'd appreciate any feedback you have.
I've sent 1000s of patches through it over the past few years.

Regards,
Simon
--
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