From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id E4C5476973 for ; Tue, 11 Aug 2015 14:33:23 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 11 Aug 2015 07:33:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,653,1432623600"; d="scan'208";a="746426770" Received: from linux.intel.com ([10.23.219.25]) by orsmga001.jf.intel.com with ESMTP; 11 Aug 2015 07:33:24 -0700 Received: from vmed.fi.intel.com (unknown [10.237.72.65]) by linux.intel.com (Postfix) with ESMTP id 45A056A4083; Tue, 11 Aug 2015 07:32:36 -0700 (PDT) From: Ed Bartosh To: openembedded-core@lists.openembedded.org Date: Tue, 11 Aug 2015 17:33:16 +0300 Message-Id: <1439303596-18965-1-git-send-email-ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [PATCH v3] create-pull-request: cd to relative directory X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2015 14:33:25 -0000 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 --- scripts/create-pull-request | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 216edfd..786fd1ed 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request @@ -177,12 +177,16 @@ mkdir $ODIR if [ -n "$RELDIR" ]; then ODIR=$(realpath $ODIR) - extraopts="--relative=$RELDIR" + prevdir=$(pwd) + cd $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" ] && cd $prevdir + # Customize the cover letter CL="$ODIR/0000-cover-letter.patch" PM="$ODIR/pull-msg" -- 2.1.4