diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-08-05 12:16:00 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-09 00:14:00 -0700 |
| commit | da0f5037b691b4a6a64e5865063af13d2be73679 (patch) | |
| tree | 5d7f536ca6a0e8516a8fab387f94e544dc39ee58 /scripts | |
| parent | d31f89bd816cd8b2160acac2af70d9d5f13b3b5c (diff) | |
| download | poky-da0f5037b691b4a6a64e5865063af13d2be73679.tar.gz | |
create-pull-request: cd to relative directory
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.
(From OE-Core rev: 3042956a86167f89beccc5d05f1fad1844e7c36a)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/create-pull-request | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 216edfd751..be493795b5 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request | |||
| @@ -177,12 +177,15 @@ mkdir $ODIR | |||
| 177 | 177 | ||
| 178 | if [ -n "$RELDIR" ]; then | 178 | if [ -n "$RELDIR" ]; then |
| 179 | ODIR=$(realpath $ODIR) | 179 | ODIR=$(realpath $ODIR) |
| 180 | extraopts="--relative=$RELDIR" | 180 | pushd $RELDIR > /dev/null |
| 181 | extraopts="--relative" | ||
| 181 | fi | 182 | fi |
| 182 | 183 | ||
| 183 | # Generate the patches and cover letter | 184 | # Generate the patches and cover letter |
| 184 | git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null | 185 | git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null |
| 185 | 186 | ||
| 187 | [ -n "$RELDIR" ] && popd > /dev/null | ||
| 188 | |||
| 186 | # Customize the cover letter | 189 | # Customize the cover letter |
| 187 | CL="$ODIR/0000-cover-letter.patch" | 190 | CL="$ODIR/0000-cover-letter.patch" |
| 188 | PM="$ODIR/pull-msg" | 191 | PM="$ODIR/pull-msg" |
