graft: Require destination branch. Fix #23

This is to avoid the old behaviour of automatically
merging into master.
This commit is contained in:
Leila Muhtasib 2012-06-12 21:43:39 -04:00 committed by Nicolai Skogheim
parent 7d1ede1022
commit 3d0b4feb80
4 changed files with 9 additions and 11 deletions

View file

@ -4,6 +4,7 @@ src=$1
dst=$2
test -z $src && echo "source branch required." 1>&2 && exit 1
test -z $dst && echo "destination branch required." 1>&2 && exit 1
git checkout $dst \
&& git merge --no-ff $src \

View file

@ -7,10 +7,10 @@
\fBgit\-graft\fR \- Merge and destroy a given branch
.
.SH "SYNOPSIS"
\fBgit\-graft\fR <src\-branch> [<dest\-branch>]
\fBgit\-graft\fR <src\-branch> <dest\-branch>
.
.SH "DESCRIPTION"
Merge commits from <src\-branch> into <dest\-branch> which defaults to the current branch\.
Merge commits from <src\-branch> into <dest\-branch>
.
.SH "OPTIONS"
<src\-branch>
@ -23,7 +23,6 @@ Merge commits from <src\-branch> into <dest\-branch> which defaults to the curre
.nf
$ git graft new_feature dev
$ git graft new_feature
.
.fi
.

View file

@ -65,7 +65,7 @@
<ol class='man-decor man-head man head'>
<li class='tl'>git-graft(1)</li>
<li class='tc'></li>
<li class='tc'>Git Extras</li>
<li class='tr'>git-graft(1)</li>
</ol>
@ -76,11 +76,11 @@
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>git-graft</code> &lt;src-branch&gt; [&lt;dest-branch&gt;]</p>
<p><code>git-graft</code> &lt;src-branch&gt; &lt;dest-branch&gt;</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p> Merge commits from &lt;src-branch&gt; into &lt;dest-branch&gt; which defaults to the current branch.</p>
<p> Merge commits from &lt;src-branch&gt; into &lt;dest-branch&gt;</p>
<h2 id="OPTIONS">OPTIONS</h2>
@ -91,12 +91,11 @@
<h2 id="EXAMPLES">EXAMPLES</h2>
<pre><code>$ git graft new_feature dev
$ git graft new_feature
</code></pre>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Kenneth Reitz &lt;<a href="&#x6d;&#x61;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x6d;&#101;&#64;&#x6b;&#101;&#x6e;&#110;&#x65;&#x74;&#104;&#114;&#101;&#x69;&#116;&#122;&#x2e;&#99;&#111;&#x6d;" data-bare-link="true">&#109;&#x65;&#x40;&#107;&#x65;&#110;&#x6e;&#101;&#x74;&#x68;&#x72;&#101;&#105;&#x74;&#x7a;&#46;&#99;&#111;&#109;</a>&gt;</p>
<p>Written by Kenneth Reitz &lt;<a href="&#109;&#97;&#105;&#x6c;&#x74;&#x6f;&#58;&#109;&#101;&#64;&#107;&#x65;&#110;&#x6e;&#101;&#x74;&#104;&#114;&#x65;&#105;&#x74;&#x7a;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#109;&#x65;&#64;&#107;&#101;&#110;&#x6e;&#101;&#116;&#104;&#x72;&#101;&#105;&#x74;&#122;&#46;&#x63;&#111;&#x6d;</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>

View file

@ -3,11 +3,11 @@ git-graft(1) -- Merge and destroy a given branch
## SYNOPSIS
`git-graft` &lt;src-branch&gt; [&lt;dest-branch&gt;]
`git-graft` &lt;src-branch&gt; &lt;dest-branch&gt;
## DESCRIPTION
Merge commits from &lt;src-branch&gt; into &lt;dest-branch&gt; which defaults to the current branch.
Merge commits from &lt;src-branch&gt; into &lt;dest-branch&gt;
## OPTIONS
@ -18,7 +18,6 @@ git-graft(1) -- Merge and destroy a given branch
## EXAMPLES
$ git graft new_feature dev
$ git graft new_feature
## AUTHOR