git-utils 0.5.8 → 0.5.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 865ddb9facc2194894dd11204c25524e97699025
4
- data.tar.gz: 556b36d014cea2bb18826c921cb3667b2853f5d1
3
+ metadata.gz: a4989aaf3c2043e0352d357cc280bb2f092948b7
4
+ data.tar.gz: f64e3d0b193157f93789ea4bd9d9de03f192cbd7
5
5
  SHA512:
6
- metadata.gz: 0d5b3eb4c2947b6f5afcb507c0434f4d16b54c141cb7c975315bfcc52ec538fdca27ce3645bfeb070604a106315b4ec06fde0a81332b43d1428f4e244cd3ea5b
7
- data.tar.gz: fd1e6cfb43bcf5b825bd97c2adfc6a95bcbe831728f75b56c394fce259ac634e7dc823a153aa69332df989aa1f963e3008c6aa3a5380e85c405f72c19a99eb86
6
+ metadata.gz: 1acc87da702c992c97084d24b36010f81a75b76a664e49a70e596a1c6d4d3397d10cb771184d7633b646c422b8cd308defe50a3de13c06f4ab506742711473b7
7
+ data.tar.gz: 6cb161be0803993673827b688b0d30c0a9ca2820a7eb9283a389524fc1b861509dca611741251a75fe4ec913413aa1135a80391f1c94ccabbaed0bdecdcd4a38
data/README.md CHANGED
@@ -11,9 +11,9 @@ The `git-utils` used to be pure Bash scripts, but they are now available as a Ru
11
11
  ## Commands
12
12
 
13
13
  * `git amend`: alias for `git commit --amend`
14
- * `git anal` (use with caution): makes a commit with the message "Make anal changes"
14
+ * `git anal` (*use with caution*): makes a commit with the message "Make anal changes"
15
15
  * `git bump`: makes a commit with the message "Bump version number"
16
- * `git cleanup`: deletes every branch already merged into current branch (apart from `master`, `staging`, and `development`)
16
+ * `git cleanup`: deletes every branch already merged into current branch (apart from `master`, `staging`, `development`, and any branches listed in `~/.git-cleanup-preserved`)
17
17
  * `git merge-branch [branch]`: merges current branch into given branch (defaults to `master`)
18
18
  * `git open`: opens the remote page for the repo (OS X only)
19
19
  * `git polish`: makes a commit with the message "Polish"
@@ -69,15 +69,15 @@ These options can be overriden (and thus restored to their defaults) by passing
69
69
  $ git pull
70
70
  $ git checkout add-markdown-support
71
71
 
72
- The purpose of `git sync` is to prepare the current branch for rebasing against `master`:
72
+ The main purpose of `git sync` is to prepare the current branch for merging with `master`:
73
73
 
74
74
  $ git sync
75
- $ git rebase master
75
+ $ git merge master
76
76
 
77
77
  (This is essentially equivalent to
78
78
 
79
79
  $ git fetch
80
- $ git rebase origin/master
80
+ $ git merge origin/master
81
81
 
82
82
  but I don't like having `master` and `origin/master` be different since that means you have to remember to run `git pull` on `master` some time down the line.)
83
83
 
data/bin/git-cleanup CHANGED
@@ -2,8 +2,16 @@
2
2
 
3
3
  # Deletes (almost) every branch already merged into current branch.
4
4
  # Exceptions are `master`, `staging`, and `development`, and the current
5
- # branch, which are preserved.
6
- preserved = "(master|staging|development)"
7
- cmd = %(git branch --merged | grep -v "\*" | egrep -v "#{preserved}" | )
5
+ # branch, which are preserved. We also support custom configuration via the
6
+ # `~/.git-cleanup-preserved` file.
7
+ preserved = "master|staging|development"
8
+ preserved_file = File.join(Dir.home, '.git-cleanup-preserved')
9
+ if File.exist?(preserved_file)
10
+ additional_preserved = File.read(preserved_file).strip.split("\n")
11
+ unless additional_preserved.empty?
12
+ preserved += '|' + additional_preserved.join('|')
13
+ end
14
+ end
15
+ cmd = %(git branch --merged | grep -v "\*" | egrep -v "(#{preserved})" | )
8
16
  cmd += 'xargs -n 1 git branch -d'
9
17
  system cmd
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Utils
3
- VERSION = "0.5.8"
3
+ VERSION = "0.5.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-03 00:00:00.000000000 Z
11
+ date: 2013-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Add some Git utilities
14
14
  email: