[OE-core] [PATCH] create-pull-request: cd to relative directory

Khem Raj raj.khem at gmail.com
Thu Aug 6 16:16:08 UTC 2015


> On Aug 6, 2015, at 8:16 AM, Paul Eggleton <paul.eggleton at linux.intel.com> wrote:
> 
> On Thursday 06 August 2015 08:05:40 Khem Raj wrote:
>>> On Aug 6, 2015, at 1:38 AM, Paul Eggleton <paul.eggleton at linux.intel.com>
>>> wrote:>
>>> On Wednesday 05 August 2015 20:33:48 Khem Raj wrote:
>>>> On Wed, Aug 5, 2015 at 2:01 AM, Ed Bartosh <ed.bartosh at linux.intel.com>
>>> 
>>> wrote:
>>>>> create-pull-request -d path creates empty patches if directory
>>>>> is specified as a path, i.e. ./bitbake or ./bitbake/ or full path.
>>>>> It behaves expected way only if script is run with -d bitbake, i.e.
>>>>> relative dir name doesn't contain '\'.
>>>>> 
>>>>> Fixed this unwanted behaviour by changing directory and running
>>>>> git format-patch in it with --relative, without specifying
>>>>> relative path as a parameter.
>>>>> 
>>>>> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
>>>>> ---
>>>>> 
>>>>> scripts/create-pull-request | 5 ++++-
>>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>> 
>>>>> diff --git a/scripts/create-pull-request b/scripts/create-pull-request
>>>>> index 216edfd..7eac618 100755
>>>>> --- a/scripts/create-pull-request
>>>>> +++ b/scripts/create-pull-request
>>>>> @@ -177,12 +177,15 @@ mkdir $ODIR
>>>>> 
>>>>> if [ -n "$RELDIR" ]; then
>>>>> 
>>>>>       ODIR=$(realpath $ODIR)
>>>>> 
>>>>> -       extraopts="--relative=$RELDIR"
>>>>> +       pushd $RELDIR
>>>> 
>>>> can we avoid using pushd so it works with non bash shells too ?
>>> 
>>> Should be possible, but it's worth mentioning that this script already
>>> starts with #!/bin/bash.
>> 
>> Does it have to be ?
> 
> Are you volunteering to fix any other bashisms in the script? If so no ;)

looking at the script there seems to be none and checkbashism confirms it

checkbashisms scripts/create-pull-request
could not find any possible bashisms in bash script scripts/create-pull-request

so in effect this will be the first one. May be in your V2 you should remove /bin/bash from interpreter
as well.

> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150806/39949e19/attachment-0002.sig>


More information about the Openembedded-core mailing list