Good idea and good work.<br clear="all"><div style="text-align:center"></div><div style="text-align:center"><div align="left" style="font-family:&#39;Times New Roman&#39;;font-size:medium"><font face="Arial" color="#333333" size="-1"><br>

<br><b>@g</b></font></div></div><br>
<br><br><div class="gmail_quote">On Fri, Apr 6, 2012 at 00:31, Darren Hart <span dir="ltr">&lt;<a href="mailto:dvhart@linux.intel.com">dvhart@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

It is common to use the same remote branch name as the local branch<br>
name. In this case, it would be nice not to have to specify the<br>
remote branch name.<br>
<br>
Make the -b argument optional and assume the remote branch is the same<br>
name as the local branch. Print a NOTE to this effect so as not to<br>
catch the user by surprise:<br>
<br>
NOTE: Assuming remote branch &#39;notthere&#39;, use -b to override.<br>
<br>
If the remote branch doesn&#39;t exist, a WARNING is displayed just as if<br>
the user had used -b to specify a non-existent branch:<br>
<br>
WARNING: Branch &#39;notthere&#39; was not found on the contrib git tree.<br>
         Please check your remote and branch parameter before sending.<br>
<br>
Signed-off-by: Darren Hart &lt;<a href="mailto:dvhart@linux.intel.com">dvhart@linux.intel.com</a>&gt;<br>
---<br>
<div class="im"> scripts/create-pull-request |   11 ++++++++---<br>
 1 files changed, 8 insertions(+), 3 deletions(-)<br>
<br>
</div>diff --git a/scripts/create-pull-request b/scripts/create-pull-request<br>
index 600fa7a..9a8913d 100755<br>
--- a/scripts/create-pull-request<br>
+++ b/scripts/create-pull-request<br>
@@ -34,8 +34,8 @@ RFC=0<br>
 usage() {<br>
 CMD=$(basename $0)<br>
 cat &lt;&lt;EOM<br>
-Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote -b branch<br>
-  -b branch           Branch name in the specified remote<br>
+Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote [-b branch]<br>
+  -b branch           Branch name in the specified remote (default: current branch)<br>
   -c                  Create an RFC (Request for Comment) patch series<br>
   -h                  Display this help message<br>
   -i commit_id        Ending commit (default: HEAD)<br>
@@ -120,7 +120,12 @@ while getopts &quot;b:chi:m:o:p:r:s:u:&quot; OPT; do<br>
        esac<br>
 done<br>
<br>
-if [ -z &quot;$BRANCH&quot; ] || [ -z &quot;$REMOTE_URL&quot; ]; then<br>
+if [ -z &quot;$BRANCH&quot; ]; then<br>
+       BRANCH=$(git branch | grep -e &quot;^\* &quot; | cut -d&#39; &#39; -f2)<br>
+       echo &quot;NOTE: Assuming remote branch &#39;$BRANCH&#39;, use -b to override.&quot;<br>
+fi<br>
+<br>
+if [ -z &quot;$REMOTE_URL&quot; ]; then<br>
        usage<br>
        exit 1<br>
 fi<br>
<div class="HOEnZb"><div class="h5">--<br>
1.7.6.5<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
</div></div></blockquote></div><br>