threads / discuss / 10134

stgit: editing description of patch

Subject: stgit: editing description of patch

## tl;dr

8 messages between Oct 3, 2007 and Oct 5, 2007.

replies: 7people: 3as markdown or json

Jon Smirl· Oct 3, 2007, 23:26 UTC · lore

What is the right procedure for editing the various attributes of a stgit patch? patch name, description, etc.... I just emailed a series to myself and the titles/comments are all messed up.

On my box all of the patches have names -- stg series shows them. But when I emailed them half of the patch didn't have the right subjects.

-- 
Jon Smirl
jonsmirl@gmail.com
Jon Smirl· Oct 4, 2007, 02:14 UTC · re: Jon Smirl · lore

Re: stgit: editing description of patch

On 10/3/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> What is the right procedure for editing the various attributes of a
> stgit patch? patch name, description, etc....  I just emailed a series
> to myself and the titles/comments are all messed up.
Editing these is done with the stg refresh command.
>
> On my box all of the patches have names -- stg series shows them. But
> when I emailed them half of the patch didn't have the right subjects.
this is controled in the template files
Show 5 quoted lines
>
> --
> Jon Smirl
> jonsmirl@gmail.com
>
-- 
Jon Smirl
jonsmirl@gmail.com
Karl Hasselström· Oct 4, 2007, 08:26 UTC · re: Jon Smirl · lore

Re: stgit: editing description of patch

On 2007-10-03 22:14:20 -0400, Jon Smirl wrote:
Show 7 quoted lines
> On 10/3/07, Jon Smirl <jonsmirl@gmail.com> wrote:
>
> > What is the right procedure for editing the various attributes of
> > a stgit patch? patch name, description, etc.... I just emailed a
> > series to myself and the titles/comments are all messed up.
>
> Editing these is done with the stg refresh command.
This is "stg edit" in really new StGits.
Show 5 quoted lines
> > On my box all of the patches have names -- stg series shows them.
> > But when I emailed them half of the patch didn't have the right
> > subjects.
>
> this is controled in the template files
Anything here you'd characterize as a bug?
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Jon Smirl· Oct 4, 2007, 13:16 UTC · re: Karl Hasselström · lore

Re: stgit: editing description of patch

On 10/4/07, Karl Hasselström <kha@treskal.com> wrote:
Show 7 quoted lines
> > > On my box all of the patches have names -- stg series shows them.
> > > But when I emailed them half of the patch didn't have the right
> > > subjects.
> >
> > this is controled in the template files
>
> Anything here you'd characterize as a bug?

No, not after I have learned more about stg. The missing subjects were from other patches I had imported from emails. They has all of the email headers on them. Once I edited those out the subjects appeared ok. 'stg edit' should help with this, it was non-obvious to use 'stg refresh' to edit the patch descriptions.

Why is mailing a patch series so slow?

There also seems to be a disconnect when mailing patches. Locally the patches have a name, when you email them it uses the short description for the name by default instead of the local name. This may cause confusion because the emailed name does not default to the local name. A parallel issue happens on import.

Now that I am aware of the naming scheme I can deal with it, but this may be a problem for new users. It might be better to force the short description and local name to always match.

-- 
Jon Smirl
jonsmirl@gmail.com
Karl Hasselström· Oct 4, 2007, 15:48 UTC · re: Jon Smirl · lore

Re: stgit: editing description of patch

On 2007-10-04 09:16:46 -0400, Jon Smirl wrote:
> Why is mailing a patch series so slow?

Because the default per-patch delay is 5 seconds. You can change it by setting stgit.smtpdelay in your config, or passing --sleep on the command line.

Show 9 quoted lines
> There also seems to be a disconnect when mailing patches. Locally
> the patches have a name, when you email them it uses the short
> description for the name by default instead of the local name. This
> may cause confusion because the emailed name does not default to the
> local name. A parallel issue happens on import.
>
> Now that I am aware of the naming scheme I can deal with it, but
> this may be a problem for new users. It might be better to force the
> short description and local name to always match.

I've never thought of the patch names as anything that would make sense to export from a repository (like reflogs), so using the first line of the commit message for mail subject (like git does) always seemed like a no-brainer. But then I don't have any experience using quilt or any related tool.

The default when creating a new patch is to make up a name from its commit message (the user is free to give a name explicitly, however); the same goes when you import a patch mbox. But when importing a patch series (with "stg import --series"), I see the names are taken from the series file you import. Maybe that should change, at least optionally.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Jon Smirl· Oct 4, 2007, 16:45 UTC · re: Karl Hasselström · lore

Re: stgit: editing description of patch

On 10/4/07, Karl Hasselström <kha@treskal.com> wrote:
Show 5 quoted lines
> I've never thought of the patch names as anything that would make
> sense to export from a repository (like reflogs), so using the first
> line of the commit message for mail subject (like git does) always
> seemed like a no-brainer. But then I don't have any experience using
> quilt or any related tool.

Why are the patch name and the short description independent variables? Wouldn't it make more sense to treat these as a single unified item? If I rename the patch it would automatically edit the first line of the description, etc...

When importing a patch from a saved email, stg should strip all the email headers out of the description. I have to manually fix that up.

-- 
Jon Smirl
jonsmirl@gmail.com
Karl Hasselström· Oct 4, 2007, 17:39 UTC · re: Jon Smirl · lore

Re: stgit: editing description of patch

On 2007-10-04 12:45:17 -0400, Jon Smirl wrote:
Show 12 quoted lines
> On 10/4/07, Karl Hasselström <kha@treskal.com> wrote:
>
> > I've never thought of the patch names as anything that would make
> > sense to export from a repository (like reflogs), so using the
> > first line of the commit message for mail subject (like git does)
> > always seemed like a no-brainer. But then I don't have any
> > experience using quilt or any related tool.
>
> Why are the patch name and the short description independent
> variables? Wouldn't it make more sense to treat these as a single
> unified item? If I rename the patch it would automatically edit the
> first line of the description, etc...

I guess Catalin would have to answer that -- it's "always" been like that. But one obvious problem are patches with identical messages -- just today I created a series of seven patches that all had "debug" for a message. Another is that you usually want descriptive commit messages, but may want short and easy-to-type patch names.

> When importing a patch from a saved email, stg should strip all the
> email headers out of the description. I have to manually fix that
> up.

Do you do "stg import -M"? That's for importing one or more patches contained in an mbox. Without the -M, I think the default is to expect plain diff input.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Catalin Marinas· Oct 5, 2007, 09:16 UTC · re: Karl Hasselström · lore

Re: stgit: editing description of patch

(for whatever reason, gnus decided that it no longer likes the authenticated SMTP server, so I'm trying to post via gmane).

On Thu, 04 Oct 2007 19:39:29 +0200, Karl Hasselström wrote:
Show 12 quoted lines
> On 2007-10-04 12:45:17 -0400, Jon Smirl wrote:
> 
>> Why are the patch name and the short description independent
>> variables? Wouldn't it make more sense to treat these as a single
>> unified item? If I rename the patch it would automatically edit the
>> first line of the description, etc...
> 
> I guess Catalin would have to answer that -- it's "always" been like
> that. But one obvious problem are patches with identical messages --
> just today I created a series of seven patches that all had "debug"
> for a message. Another is that you usually want descriptive commit
> messages, but may want short and easy-to-type patch names.

That's pretty much the case. There are also the historical reasons (quilt does the same) plus the fact the exporting should really generate shorter and simpler file names rather than name with capitals and spaces. I've also seen people writing a single paragraph over several lines without a short description. You wouldn't really want a patch name that long.

Anyway, 'stg series -d' would show the patch name together with the short description.

Show 7 quoted lines
>> When importing a patch from a saved email, stg should strip all the
>> email headers out of the description. I have to manually fix that
>> up.
> 
> Do you do "stg import -M"? That's for importing one or more patches
> contained in an mbox. Without the -M, I think the default is to expect
> plain diff input.

There is also 'stg import -m' for single e-mails rather than mbox. StGIT should be able to cope with attachments as well.

Catalin

← back to recent threads