git-branch--stray 1.3.0 → 1.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3edf95c82fd4b68e2ae90c5e06b61e175df3125903a1af15cb32775984ddc1d5
4
- data.tar.gz: 566fed2ffb592d25d50327347c8baa85af55282c476a635397c3a720699a61b6
3
+ metadata.gz: 794726db6368eccf8a09286d03014cdc427ffd3dfc896694af1bee038533ac89
4
+ data.tar.gz: 1f4e78547456b0f15b4a03b6abc96c527b76e58048df9426f88943cbfd6b6838
5
5
  SHA512:
6
- metadata.gz: f76d1dcbd5e35d2a7e0ad039361650f890a231cf7121e826b51d32d50dfcf34cf8c9e68a279f6e27e535b5c733001241f80329af745fde3b488e33586d5270fc
7
- data.tar.gz: e4956a00232c8072f0f80a9ede1d797b4829eeef5782ae193c313fdf5fd1a92c0ba590c8c86bda3da1160a6ae8d07430cc51001ad56a68578690856248b7f669
6
+ metadata.gz: 97d5f24e9a159cf7bb2e3cfd0bc34a91296e826029eaf98b2265174b990db3a9d187cc88cd83962b79a31dbecaf48309052f88d31bf54d9e8d1cc605084c4c27
7
+ data.tar.gz: 58be300de49e6822b9db82c31860970b02b20b79f162129b17a6655daf177654863ed941c04a9840a6ee112c3f76ec72f16162ef607a8fb53eeb975e403547e2
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+
3
+ #
4
+ # inspiration taken from:
5
+ #
6
+ # https://github.com/paulirish/git-recent
7
+ #
8
+
9
+ NL='%0a' ; # ASCII NEWLINE
10
+ DELIM='%07' ; # ASCII BELL
11
+
12
+ HEAD="%(if)%(HEAD)%(then)%(end)" ; # emoji prefix for current branch
13
+ EMPTY='%(color:black) %(color:reset)' ; # to make `column` work correctly
14
+
15
+ case $1 in
16
+ --all)
17
+ PATTERN='refs/heads refs/remotes' ;
18
+ DEREF='' ;
19
+ shift ;
20
+ ;;
21
+ --remotes)
22
+ PATTERN='refs/remotes' ;
23
+ DEREF='' ;
24
+ shift ;
25
+ ;;
26
+ --tags)
27
+ PATTERN='refs/tags' ;
28
+ DEREF='*' ;
29
+ shift ;
30
+ ;;
31
+ *)
32
+ PATTERN='refs/heads' ;
33
+ DEREF='' ;
34
+ ;;
35
+ esac
36
+
37
+ BRANCH_NAME="%(color:yellow)%(refname:short)%(color:reset)" ;
38
+ OBJECT_NAME="%(color:red)%(objectname:short)%(color:reset)" ;
39
+ COMMIT_DATE="%(color:bold green)(%(${DEREF}committerdate:relative))%(color:reset)" ;
40
+ AUTHOR_NAME="%(color:bold blue)%(${DEREF}authorname)%(color:reset)" ;
41
+
42
+ COMMIT_SUBJECT='%(contents:subject)' ;
43
+
44
+ FORMAT="${HEAD} ${BRANCH_NAME}${DELIM}" ;
45
+ FORMAT="${FORMAT}${OBJECT_NAME} ${COMMIT_DATE} ${AUTHOR_NAME}" ;
46
+ FORMAT="${FORMAT}${NL}${EMPTY}${DELIM}${COMMIT_SUBJECT}" ;
47
+ FORMAT="${FORMAT}${NL}${EMPTY}${DELIM}" ; # empty separator line
48
+
49
+ git for-each-ref \
50
+ --color=always \
51
+ --sort=-committerdate \
52
+ --format="${FORMAT}" \
53
+ ${PATTERN} "$@" | column -t -s $'\a' | less --RAW-CONTROL-CHARS ;
54
+
55
+ # That's all Folks!
@@ -1,6 +1,7 @@
1
1
  lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'git/branch/stray/version'
4
+ require 'git/branch/stray/gemspec'
4
5
 
5
6
  Gem::Specification.new do |spec|
6
7
  spec.name = Git::Branch::Stray::NAME
@@ -22,6 +23,8 @@ Gem::Specification.new do |spec|
22
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
24
  spec.require_paths = ['lib']
24
25
 
26
+ spec.post_install_message = Git::Branch::Stray::PIM
27
+
25
28
  spec.add_dependency 'consenter', '~> 1.0'
26
29
 
27
30
  spec.add_development_dependency 'bundler'
@@ -0,0 +1,20 @@
1
+ module Git
2
+ module Branch
3
+ module Stray
4
+ PIM = <<~"PIM".freeze
5
+
6
+ The following aliases are recommended for \033[1mgit branch--stray\33[0m:
7
+
8
+ \tgit config --global \033[1malias.bls\033[0m branch--list--stray
9
+ \tgit config --global \033[1malias.bds\033[0m branch--delete--stray
10
+
11
+ The following is an optional convenience alias:
12
+
13
+ \tgit config --global \033[1malias.blr\033[0m branch--list--recent
14
+
15
+ Thanks for using \033[1mgit branch--stray\033[0m ... the ultimate housekeeping tool for git branches!
16
+
17
+ PIM
18
+ end
19
+ end
20
+ end
@@ -2,7 +2,7 @@ module Git
2
2
  module Branch
3
3
  module Stray
4
4
  NAME = 'git-branch--stray'.freeze
5
- VERSION = '1.3.0'.freeze
5
+ VERSION = '1.4.0'.freeze
6
6
 
7
7
  def self.version
8
8
  "#{NAME} v#{VERSION}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-branch--stray
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
@@ -99,6 +99,7 @@ email:
99
99
  - pvandenberk@mac.com
100
100
  executables:
101
101
  - git-branch--delete--stray
102
+ - git-branch--list--recent
102
103
  - git-branch--list--stray
103
104
  extensions: []
104
105
  extra_rdoc_files: []
@@ -114,15 +115,21 @@ files:
114
115
  - bin/console
115
116
  - bin/setup
116
117
  - exe/git-branch--delete--stray
118
+ - exe/git-branch--list--recent
117
119
  - exe/git-branch--list--stray
118
120
  - git-branch--stray.gemspec
119
121
  - lib/git/branch/stray.rb
122
+ - lib/git/branch/stray/gemspec.rb
120
123
  - lib/git/branch/stray/version.rb
121
124
  homepage: https://github.com/pvdb/git-branch--stray
122
125
  licenses:
123
126
  - MIT
124
127
  metadata: {}
125
- post_install_message:
128
+ post_install_message: "\nThe following aliases are recommended for \e[1mgit branch--stray\e[0m:\n\n\tgit
129
+ config --global \e[1malias.bls\e[0m branch--list--stray\n\tgit config --global \e[1malias.bds\e[0m
130
+ branch--delete--stray\n\nThe following is an optional convenience alias:\n\n\tgit
131
+ config --global \e[1malias.blr\e[0m branch--list--recent\n\nThanks for using \e[1mgit
132
+ branch--stray\e[0m ... the ultimate housekeeping tool for git branches!\n\n"
126
133
  rdoc_options: []
127
134
  require_paths:
128
135
  - lib