git-whistles 0.7.7 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +10 -8
- data/README.md +15 -12
- data/bin/git-outstanding-features +10 -3
- data/git-whistles.gemspec +5 -0
- data/lib/git-whistles/version.rb +1 -1
- data/libexec/git-chop.sh +9 -8
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git-whistles (0.
|
4
|
+
git-whistles (0.8.0)
|
5
5
|
pivotal-tracker (~> 0.5.6)
|
6
6
|
term-ansicolor
|
7
7
|
|
@@ -12,17 +12,18 @@ GEM
|
|
12
12
|
coderay (1.0.9)
|
13
13
|
crack (0.4.1)
|
14
14
|
safe_yaml (~> 0.9.0)
|
15
|
-
happymapper (0.4.
|
15
|
+
happymapper (0.4.1)
|
16
16
|
libxml-ruby (~> 2.0)
|
17
17
|
libxml-ruby (2.7.0)
|
18
18
|
method_source (0.8.2)
|
19
|
-
mime-types (
|
20
|
-
mini_portile (0.5.
|
19
|
+
mime-types (2.0)
|
20
|
+
mini_portile (0.5.2)
|
21
21
|
nokogiri (1.6.0)
|
22
22
|
mini_portile (~> 0.5.0)
|
23
|
-
nokogiri-happymapper (0.5.
|
23
|
+
nokogiri-happymapper (0.5.8)
|
24
24
|
nokogiri (~> 1.5)
|
25
|
-
pivotal-tracker (0.5.
|
25
|
+
pivotal-tracker (0.5.12)
|
26
|
+
builder
|
26
27
|
builder
|
27
28
|
crack
|
28
29
|
happymapper (>= 0.3.2)
|
@@ -30,6 +31,7 @@ GEM
|
|
30
31
|
nokogiri (>= 1.5.5)
|
31
32
|
nokogiri-happymapper (>= 0.5.4)
|
32
33
|
rest-client (~> 1.6.0)
|
34
|
+
rest-client (~> 1.6.0)
|
33
35
|
pry (0.9.12.2)
|
34
36
|
coderay (~> 1.0.5)
|
35
37
|
method_source (~> 0.8)
|
@@ -39,11 +41,11 @@ GEM
|
|
39
41
|
rake (10.1.0)
|
40
42
|
rest-client (1.6.7)
|
41
43
|
mime-types (>= 1.16)
|
42
|
-
safe_yaml (0.9.
|
44
|
+
safe_yaml (0.9.7)
|
43
45
|
slop (3.4.6)
|
44
46
|
term-ansicolor (1.2.2)
|
45
47
|
tins (~> 0.8)
|
46
|
-
tins (0.
|
48
|
+
tins (0.13.1)
|
47
49
|
|
48
50
|
PLATFORMS
|
49
51
|
ruby
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
This repository is about sharing helper scripts for the [Git](http://git-scm.com/)
|
2
|
-
version control system.
|
1
|
+
This repository is about sharing helper scripts for the [Git](http://git-scm.com/) version control system.
|
3
2
|
|
4
3
|
Install with:
|
5
4
|
|
@@ -10,16 +9,20 @@ Otherwise strange load issues may happen.
|
|
10
9
|
|
11
10
|
Use it with:
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
|
13
|
+
| Command | Description|
|
14
|
+
|---------|------------|
|
15
|
+
| `git ff-all-branches [-f] [-p] [-v]` | Fast-forward all local tracking branches to their remote counterpart (where possible). Very useful on big projects. |
|
16
|
+
| `git stash-and-checkout [branch]` | As the name implies: stash and checkout another branch. |
|
17
|
+
| `git pull-request [--from your-branch] [--to target-branch]` | Open your browser at a Github pull-request page for the specified branch (defaults to the current `head`). If you're using Pivotal Tracker and your branch has a story number in its name, populates your pull request with story details. |
|
18
|
+
| `git outstanding-features [-f from-branch] [-t to-branch] [--oneline]` | List the pull requests merged in `[to-branch]` but not in `[from-branch]`. Useful to prepare a list of stuff you're going to deploy. Defaults to listing what's on `origin/master` but not on `origin/production`. By default lists one feature per line, if `--oneline` or `-o` is specified features will be separated by spaces instead. [[PedroCunha](https://github.com/PedroCunha)] |
|
19
|
+
| `git chop [branch ...]` | Deletes the local and origin copy of a branch. Useful to close feature branches once a feature is completed. It also accepts multiple branches separated by spaces [[David Silva](https://github.com/Davidslv)] |
|
20
|
+
| `git list-branches [-l] [-r] [-i integration-branch]` | Colourful listing of all local or origin branches, and their distance to an integration branch (`master` by default). |
|
21
|
+
| `git merge-po <ancestor> <left> <right>` | Merge engine for GetText PO files. |
|
22
|
+
| `git select <story-id>` | Checkout a local branch with the matching number. If not found, lists remote branches |
|
23
|
+
| `git latest-pushes [-n NR_RESULTS] [-p PATTERN]` | Show latest pushed branches to origin. Defaults to 20 results. Pattern is appended to refs/remotes/origin/ so include the team or project name to filter results. [[PedroCunha](https://github.com/PedroCunha)] |
|
24
|
+
| `git pivotal-branch <story-id>` | Creates a branch name suggestion from the specified Pivotal Tracker story ID. It also comments on the story the branch name created and starts the story [[dncrht](https://github.com/dncrht)] |
|
25
|
+
|
23
26
|
|
24
27
|
### More details on some of the commands
|
25
28
|
|
@@ -20,9 +20,16 @@ class App < Git::Whistles::App
|
|
20
20
|
super
|
21
21
|
parse_args!(args)
|
22
22
|
|
23
|
-
|
24
|
-
return
|
25
|
-
|
23
|
+
merges = `git log --merges --first-parent #{options.from} ^#{options.to} | grep 'Merge pull request'`
|
24
|
+
return if merges.nil?
|
25
|
+
|
26
|
+
output = []
|
27
|
+
merges.lines.each do |merge|
|
28
|
+
merge.match(/(#\d+).*from.*\/(.*)/)
|
29
|
+
output << $1 + ' ' + $2
|
30
|
+
end
|
31
|
+
|
32
|
+
puts options.oneline ? output.join(', ') : output
|
26
33
|
end
|
27
34
|
|
28
35
|
def defaults
|
data/git-whistles.gemspec
CHANGED
@@ -20,6 +20,11 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_development_dependency "pry"
|
21
21
|
gem.add_development_dependency "pry-nav"
|
22
22
|
|
23
|
+
if RUBY_VERSION < "1.9"
|
24
|
+
gem.add_dependency "nokogiri", "~> 1.5.10"
|
25
|
+
gem.add_dependency "mime-types", "~> 1.24"
|
26
|
+
end
|
27
|
+
|
23
28
|
gem.add_dependency "pivotal-tracker", "~> 0.5.6"
|
24
29
|
gem.add_dependency "term-ansicolor"
|
25
30
|
|
data/lib/git-whistles/version.rb
CHANGED
data/libexec/git-chop.sh
CHANGED
@@ -12,13 +12,14 @@ die() {
|
|
12
12
|
head=$(git symbolic-ref HEAD 2> /dev/null || git log -1 --format=%h)
|
13
13
|
current_branch=${head#refs/heads/}
|
14
14
|
|
15
|
-
branch
|
16
|
-
: ${branch:-$head}
|
17
|
-
echo "Closing feature branch $branch"
|
15
|
+
for branch in "$@" ; do
|
16
|
+
: ${branch:-$head}
|
17
|
+
echo "Closing feature branch $branch"
|
18
18
|
|
19
|
-
if [ "$branch" = "$current_branch" ] ; then
|
20
|
-
|
21
|
-
fi
|
19
|
+
if [ "$branch" = "$current_branch" ] ; then
|
20
|
+
git checkout master || die
|
21
|
+
fi
|
22
22
|
|
23
|
-
git branch -D "$branch" || die
|
24
|
-
git push origin ":$branch" || die
|
23
|
+
git branch -D "$branch" || die
|
24
|
+
git push origin ":$branch" || die
|
25
|
+
done
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-whistles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-11-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
segments:
|
170
170
|
- 0
|
171
|
-
hash:
|
171
|
+
hash: -85854206902681188
|
172
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
173
|
none: false
|
174
174
|
requirements:
|