Re: [maintainer-tools PATCH 30/30] qf: Use .dimrc to config and extend qf.

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

 



On Tue, Aug 22, 2017 at 12:33 AM, Jani Nikula <jani.nikula@xxxxxxxxx> wrote:
> On Mon, 21 Aug 2017, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> wrote:
>> Soon we will need to extend qf for very specific
>> usages of our internal maintenance and rebase bot.
>>
>> So instead of creating yet another config file
>> let's use the existent one.
>
> I think I'd prefer a separate config file for qf.

hm.. I was here accepting this suggestion, but then I noticed our qf_help
already referrence $DIM_PREFIX

so, if we change to .qfrc we will have to redefine this prefix while re-using
dimrc we don't need any duplication.

what do you think?

>
> BR,
> Jani.
>
>>
>> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
>> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
>> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
>> ---
>>  dimrc.sample |  9 ++++++++-
>>  qf           | 18 +++++++++++++++---
>>  2 files changed, 23 insertions(+), 4 deletions(-)
>>
>> diff --git a/dimrc.sample b/dimrc.sample
>> index be7b99cb6b76..bbddecabd519 100644
>> --- a/dimrc.sample
>> +++ b/dimrc.sample
>> @@ -1,4 +1,4 @@
>> -# Sample configuration file for dim. Place this at $HOME/.dimrc or point
>> +# Sample configuration file for dim and qf. Place this at $HOME/.dimrc or point
>>  # DIM_CONFIG environment variable to it.
>>  #
>>  # Defaults are in the comments below.
>> @@ -20,3 +20,10 @@
>>
>>  # Command to run after dim apply
>>  #DIM_POST_APPLY_ACTION=
>> +
>> +#
>> +# qf
>> +#
>> +
>> +# Quilt branch prefix
>> +#QUILT_PREFIX=
>> \ No newline at end of file
>> diff --git a/qf b/qf
>> index be234e72fa15..befdb2c15b5f 100755
>> --- a/qf
>> +++ b/qf
>> @@ -26,12 +26,24 @@
>>
>>  # quilt git flow script
>>
>> -# config
>> -QUILT_PREFIX=quilt/
>> -
>>  # fail on any goof-up
>>  set -e
>>
>> +#
>> +# User configuration. Set in environment or configuration file. See
>> +# dimrc.sample for an example.
>> +#
>> +
>> +# dim configuration file
>> +DIM_CONFIG=${DIM_CONFIG:-$HOME/.dimrc}
>> +if [ -r $DIM_CONFIG ]; then
>> +     # shellcheck source=/dev/null
>> +     . $DIM_CONFIG
>> +fi
>> +
>> +# prefix for quilt branch
>> +QUILT_PREFIX=${QUILT_PREFIX:-quilt/}
>> +
>>  function cd_toplevel
>>  {
>>       cd $(git rev-parse --show-toplevel)
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux