stgit icon indicating copy to clipboard operation
stgit copied to clipboard

Stash a cover letter for a branch

Open gwd opened this issue 7 years ago • 4 comments

stg mail has the option of editing a cover letter and/or reading it in from a file, but if I'm working on several different series in parallel (and sending new iterations of each one), I'd like to be able to store a cover letter with the branch that I can just edit and update every time I send a new version. It seems like it would be pretty straightforward to have stg store it in .git/patches/$branch, and maybe edit it using a command like stg cover or something. That would solve the biggest missing piece of functionality wrt stackgit in my workflow.

gwd avatar May 02 '18 11:05 gwd

This idea makes sense to me. I appreciate you taking the time to write down this idea.

jpgrayson avatar May 08 '18 01:05 jpgrayson

I appreciate you taking the time to maintain a tool that I use every day. :-)

gwd avatar May 08 '18 09:05 gwd

It makes sense (I occasionally find that I need something similar, for example reworking a patch series and wanting to store some notes like changes from the previous version). The only comment I have on the original proposal is that it should be stored in the stgit metadata stored in the .stgit object. We've been trying for a while to get rid of .git/patches entirely.

ctmarinas avatar May 10 '18 13:05 ctmarinas

FWIW, I use "git branch --edit-description" for storing the branch's description for "git send-email --cover-letter".

I just now tried the same with "stg email send", and unfortunately, it doesn't know how to use the branch description as cover letter. Vis:

$ stg email send --all -G --cover-letter [email protected] /tmp/AsQX8xw8f3/0000-cover-letter.patch /tmp/AsQX8xw8f3/0001-foo.patch error: git send-email: Refusing to send because the patch /tmp/AsQX8xw8f3/0000-cover-letter.patch has the template subject '*** SUBJECT HERE ***'. Pass --force if you really want to send.

It'd be nice if "stg email send --cover" worked without -G, too, I guess.

(I realize the bug was probably open against stgit 1, while my comments above are for stgit 2)

palves avatar Apr 19 '24 22:04 palves