From 3d0b4feb809a3c9aa5e032ea103b318dc89a7b62 Mon Sep 17 00:00:00 2001 From: Leila Muhtasib Date: Tue, 12 Jun 2012 21:43:39 -0400 Subject: [PATCH] graft: Require destination branch. Fix #23 This is to avoid the old behaviour of automatically merging into master. --- bin/git-graft | 1 + man/git-graft.1 | 5 ++--- man/git-graft.html | 9 ++++----- man/git-graft.md | 5 ++--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bin/git-graft b/bin/git-graft index 6944618..4e005ee 100755 --- a/bin/git-graft +++ b/bin/git-graft @@ -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 \ diff --git a/man/git-graft.1 b/man/git-graft.1 index e61a180..b2a9302 100644 --- a/man/git-graft.1 +++ b/man/git-graft.1 @@ -7,10 +7,10 @@ \fBgit\-graft\fR \- Merge and destroy a given branch . .SH "SYNOPSIS" -\fBgit\-graft\fR [] +\fBgit\-graft\fR . .SH "DESCRIPTION" -Merge commits from into which defaults to the current branch\. +Merge commits from into . .SH "OPTIONS" @@ -23,7 +23,6 @@ Merge commits from into which defaults to the curre .nf $ git graft new_feature dev -$ git graft new_feature . .fi . diff --git a/man/git-graft.html b/man/git-graft.html index 0070d7a..e15565e 100644 --- a/man/git-graft.html +++ b/man/git-graft.html @@ -65,7 +65,7 @@
  1. git-graft(1)
  2. -
  3. +
  4. Git Extras
  5. git-graft(1)
@@ -76,11 +76,11 @@

SYNOPSIS

-

git-graft <src-branch> [<dest-branch>]

+

git-graft <src-branch> <dest-branch>

DESCRIPTION

-

Merge commits from <src-branch> into <dest-branch> which defaults to the current branch.

+

Merge commits from <src-branch> into <dest-branch>

OPTIONS

@@ -91,12 +91,11 @@

EXAMPLES

$ git graft new_feature dev
-$ git graft new_feature
 

AUTHOR

-

Written by Kenneth Reitz <me@kennethreitz.com>

+

Written by Kenneth Reitz <me@kennethreitz.com>

REPORTING BUGS

diff --git a/man/git-graft.md b/man/git-graft.md index 17a51a9..fefdf98 100644 --- a/man/git-graft.md +++ b/man/git-graft.md @@ -3,11 +3,11 @@ git-graft(1) -- Merge and destroy a given branch ## SYNOPSIS -`git-graft` <src-branch> [<dest-branch>] +`git-graft` <src-branch> <dest-branch> ## DESCRIPTION - Merge commits from <src-branch> into <dest-branch> which defaults to the current branch. + Merge commits from <src-branch> into <dest-branch> ## 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