git-status-tree 3.3.0 → 3.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 +4 -4
- data/VERSION +1 -1
- data/bin/git_add_alias_tree +1 -0
- data/src/git_status_tree.rb +13 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e72a53ce9c7b68969449ed0e65909a4f84df8492c99417be1d08b5a1be3596f1
|
4
|
+
data.tar.gz: 8faf28a46bfec51cd09586c9919399f290fec1c8ffa9c315bba07bd53c09cd5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ade1eb0d039538f1e97efa83aa6c7272fceba8411fa78b448b75d929aaf9d7bf06c7bb44286ff6e8c862c77b2d5e4a48bb006b7db4d8746e27cce92f5e57aa
|
7
|
+
data.tar.gz: be24abac2836936e3d4d75b9bd3fd054ed0817c26efbdff44ebcc3dbf301d2cb016ce53966453d42ebb31861ff33c45f19e5f00fbb289f3452a850e3eb497ad4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.4.0
|
data/bin/git_add_alias_tree
CHANGED
@@ -5,6 +5,7 @@ BIN_DIR=`pwd`
|
|
5
5
|
popd > /dev/null
|
6
6
|
|
7
7
|
git config --global status-tree.indent 4
|
8
|
+
git config --global status-tree.collapse false
|
8
9
|
git config --global alias.tree "!exec $BIN_DIR/git-status-tree"
|
9
10
|
echo '#############################'
|
10
11
|
echo '# "git tree" has been added #'
|
data/src/git_status_tree.rb
CHANGED
@@ -12,7 +12,7 @@ class GitStatusTree
|
|
12
12
|
|
13
13
|
def initialize(options = {})
|
14
14
|
Node.indent = indent(options)
|
15
|
-
Node.collapse_dirs = options
|
15
|
+
Node.collapse_dirs = collapse(options)
|
16
16
|
@files = `git status --porcelain`.split("\n")
|
17
17
|
@nodes = files.map { |file| Node.create_from_string file }
|
18
18
|
@tree = nodes.reduce { |a, i| (a + i).nodes[0] }
|
@@ -35,8 +35,20 @@ class GitStatusTree
|
|
35
35
|
indent
|
36
36
|
end
|
37
37
|
|
38
|
+
def collapse(options)
|
39
|
+
# Command line option takes precedence, then git config, then default (false)
|
40
|
+
return options[:collapse] if options.key?(:collapse)
|
41
|
+
|
42
|
+
config_collapse?
|
43
|
+
end
|
44
|
+
|
38
45
|
def config
|
39
46
|
config = `git config --global status-tree.indent`.strip
|
40
47
|
config =~ /\A\d+\z/ ? config.to_i : nil
|
41
48
|
end
|
49
|
+
|
50
|
+
def config_collapse?
|
51
|
+
config = `git config --global status-tree.collapse`.strip
|
52
|
+
config == 'true'
|
53
|
+
end
|
42
54
|
end
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-status-tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wolfgang Teuber
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
11
|
date: 2025-07-03 00:00:00.000000000 Z
|
@@ -38,6 +39,7 @@ licenses:
|
|
38
39
|
metadata:
|
39
40
|
source_code_uri: https://github.com/wteuber/git-status-tree
|
40
41
|
rubygems_mfa_required: 'true'
|
42
|
+
post_install_message:
|
41
43
|
rdoc_options: []
|
42
44
|
require_paths:
|
43
45
|
- lib
|
@@ -52,7 +54,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
54
|
- !ruby/object:Gem::Version
|
53
55
|
version: '0'
|
54
56
|
requirements: []
|
55
|
-
rubygems_version: 3.
|
57
|
+
rubygems_version: 3.0.3.1
|
58
|
+
signing_key:
|
56
59
|
specification_version: 4
|
57
60
|
summary: git status in file tree format
|
58
61
|
test_files: []
|