Re: A short reminder on commit messages, freezes and hotfixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Pierre-Yves Chibon wrote:
> On Wed, Mar 06, 2019 at 10:36:16PM -0500, Todd Zullinger wrote:
>> Until the ansible repo is in pagure, a git alias could
>> probably make generating the patches for freeze break
>> requests a little easier.  Something like this:
>> 
>>     git config alias.fbr \
>>         "format-patch --subject-prefix='Freeze Break Request' --to=infrastructure@xxxxxxxxxxxxxxxxxxxxxxx"
>> 
>> And then you can generate a patch (or patches) via:
>> 
>>     git fbr @{U}
>> 
>> or
>> 
>>     git fbr -1
>>     
>> or any other options to the git format-patch command.
[...]
>> If using git send-email, the default to address can be put
>> in the sendemail config rather than embedded in the fbr
>> alias, e.g.:
>> 
>>     git config sendemail.to infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
> 
> So I've been looking to use this as it sounds most helpful, thanks for sharing
> this! :)
> 
> If I understand it correctly, it comes down to adding these lines to the
> .git/config of the ansible repo:
> '''
> [alias]
>     fbr = format-patch --subject-prefix='FBR' --to=infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
> [sendemail]
> 	to = infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
> '''

Yeah, though using git config is the preferred way to do it
And it's easier to document as a command, perhaps in the
README.md or in infra-docs.

For ansible clones on batcave01, you could even create a
config file in a shared location with the various
recommended settings and then folks could just include that,
via include.path, like:

    git config inlcude.path /path/to/shared/config

> I have one question though, what is the --to used for in the format-patch if git
> send-email doesn't support reading from it? (which is the case from what I saw
> yesterday)

The send-email command does read the "To:" field in the
file(s) generated from format-patch.  You should see a
prompt asking "To whom should the emails be sent (if
anyone)?" which allows you to add recipients in addition to
the "To:" field in the patch file.  If you skip that by
pressing enter (and the next question on Message-ID), then
send-email says:

(mbox) Adding to: infrastructure@xxxxxxxxxxxxxxxxxxxxxxx from line 'To: infrastructure@xxxxxxxxxxxxxxxxxxxxxxx'

Try that with the --dry-run option to confirm.  If you don't
see that, I'm curious what git version you have.  I can't
say with certainty if the ancient git versions on current
RHEL releases behave the same (but if you're using one of
those, there are many more useful features missing). ;)

But really, if you're using send-email, it's simpler to drop
the format-patch --to option from the fbr alias, I think.

-- 
Todd

Attachment: signature.asc
Description: PGP signature

_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux