All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] create-pull-request: cd to relative directory
@ 2015-08-05  9:01 Ed Bartosh
  2015-08-06  3:33 ` Khem Raj
  0 siblings, 1 reply; 21+ messages in thread
From: Ed Bartosh @ 2015-08-05  9:01 UTC (permalink / raw)
  To: openembedded-core

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@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
+	extraopts="--relative"
 fi
 
 # Generate the patches and cover letter
 git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
 
+[ -n "$RELDIR" ] && popd
+
 # Customize the cover letter
 CL="$ODIR/0000-cover-letter.patch"
 PM="$ODIR/pull-msg"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [PATCH v2] create-pull-request: cd to relative directory
@ 2015-08-05  9:16 Ed Bartosh
  0 siblings, 0 replies; 21+ messages in thread
From: Ed Bartosh @ 2015-08-05  9:16 UTC (permalink / raw)
  To: openembedded-core

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@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..be49379 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 > /dev/null
+	extraopts="--relative"
 fi
 
 # Generate the patches and cover letter
 git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
 
+[ -n "$RELDIR" ] && popd > /dev/null
+
 # Customize the cover letter
 CL="$ODIR/0000-cover-letter.patch"
 PM="$ODIR/pull-msg"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-08-17 10:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05  9:01 [PATCH] create-pull-request: cd to relative directory Ed Bartosh
2015-08-06  3:33 ` Khem Raj
2015-08-06  8:38   ` Paul Eggleton
2015-08-06  9:07     ` Ed Bartosh
2015-08-06 15:05     ` Khem Raj
2015-08-06 15:16       ` Paul Eggleton
2015-08-06 16:16         ` Khem Raj
2015-08-11 14:24   ` [PATCH v2] " Ed Bartosh
2015-08-11 14:33   ` [PATCH v3] " Ed Bartosh
2015-08-12  9:33     ` [PATCH v4] create-pull-request: cleanup bashisms Ed Bartosh
2015-08-12  9:35       ` Khem Raj
2015-08-12  9:49       ` shell script guidelines in oe-core? (was Re: [PATCH v4] create-pull-request: cleanup bashisms) Mikko.Rapeli
2015-08-12 16:56         ` Khem Raj
2015-08-12 17:46           ` Christopher Larson
2015-08-12 17:51             ` Christopher Larson
2015-08-13  6:27               ` Mikko.Rapeli
2015-08-14 22:01                 ` Christopher Larson
2015-08-16  1:38                   ` Christopher Larson
2015-08-17  6:14                     ` Mikko.Rapeli
2015-08-17 10:52                       ` Otavio Salvador
  -- strict thread matches above, loose matches on Subject: below --
2015-08-05  9:16 [PATCH v2] create-pull-request: cd to relative directory Ed Bartosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.