Skip to content

Commit

Permalink
Merge pull request tj#398 from nicolaiskogheim/git-graft
Browse files Browse the repository at this point in the history
graft: Require destination branch. Fix tj#23
  • Loading branch information
hemanth committed Jul 25, 2015
2 parents 9e238c8 + 4e0724b commit 9b294c4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions bin/git-graft
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
5 changes: 2 additions & 3 deletions man/git-graft.1
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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
.
Expand Down
9 changes: 4 additions & 5 deletions man/git-graft.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/git-graft.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -18,7 +18,6 @@ git-graft(1) -- Merge and destroy a given branch
## EXAMPLES

$ git graft new_feature dev
$ git graft new_feature

## AUTHOR

Expand Down

0 comments on commit 9b294c4

Please sign in to comment.