pivotal-github 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -2
- data/lib/pivotal-github/story_merge.rb +1 -1
- data/lib/pivotal-github/version.rb +1 -1
- data/spec/commands/story_merge_spec.rb +2 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -91,13 +91,15 @@ Additionally, `git story-pull` accepts any options valid for `git pull`.
|
|
91
91
|
`git story-merge` merges the current branch into `master`. On a branch called `6283185-add-markdown-support`, `git story-merge` is equivalent to the following:
|
92
92
|
|
93
93
|
$ git checkout master
|
94
|
-
$ git merge --no-ff 6283185-add-markdown-support
|
94
|
+
$ git merge --no-ff --log 6283185-add-markdown-support
|
95
95
|
|
96
96
|
Note that this effectively changes the default merge behavior from fast-forward to no-fast-forward, which makes it possible to see from `git log` which of the commit objects together have implemented a story. As noted in [A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/),
|
97
97
|
|
98
98
|
> The `--no-ff` flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature… Yes, it will create a few more (empty) commit objects, but the gain is much bigger that that cost.
|
99
99
|
|
100
|
-
|
100
|
+
In addition, the `--log` option puts the commit messages from the individual commits in the merge message, which arranges for the merge commit itself to appear in the activity log at Pivotal Tracker. This is especially useful for viewing the full diff represented by the commit.
|
101
|
+
|
102
|
+
Because of the way options are chained, passing `--ff` or `--no-log` to `git story-merge` will override the `--no-ff` or `--log` flags (respectively) and thus restore the default behavior of `git merge`.
|
101
103
|
|
102
104
|
#### Options
|
103
105
|
|
@@ -21,7 +21,7 @@ class StoryMerge < Command
|
|
21
21
|
# git merge --no-ff <story branch>
|
22
22
|
def cmd
|
23
23
|
lines = ["git checkout #{development_branch}"]
|
24
|
-
c = ['git merge --no-ff']
|
24
|
+
c = ['git merge --no-ff --log']
|
25
25
|
c << argument_string(unknown_options) unless unknown_options.empty?
|
26
26
|
c << story_branch
|
27
27
|
lines << c.join(' ')
|
@@ -17,7 +17,7 @@ describe StoryMerge do
|
|
17
17
|
|
18
18
|
describe "with no options" do
|
19
19
|
its(:cmd) { should =~ /git checkout master/ }
|
20
|
-
its(:cmd) { should =~ /git merge --no-ff #{command.story_branch}/ }
|
20
|
+
its(:cmd) { should =~ /git merge --no-ff --log #{command.story_branch}/ }
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "with a custom development branch" do
|
@@ -34,6 +34,6 @@ describe StoryMerge do
|
|
34
34
|
describe "command-line command" do
|
35
35
|
subject { `bin/git-story-merge --debug -ff -d develop` }
|
36
36
|
it { should =~ /git checkout develop/ }
|
37
|
-
it { should =~ /git merge --no-ff -ff/ }
|
37
|
+
it { should =~ /git merge --no-ff --log -ff/ }
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotal-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Add commands for Pivotal Tracker–GitHub integration
|
15
15
|
email:
|