fcom 1.0.1 → 1.1.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/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/README.md +3 -5
- data/lib/fcom/options_helpers.rb +0 -4
- data/lib/fcom/parser.rb +3 -1
- data/lib/fcom/querier.rb +1 -3
- data/lib/fcom/version.rb +1 -1
- data/lib/fcom.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a056a9aab3e0ea48cc82af0c6d3c296ca8497d3c144e37961b1db241ddc92e2
|
|
4
|
+
data.tar.gz: b27fa969ce900aa5c19fe0d818cc0728b1e43c108419baa40ba226121fcadfe8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c197afe0ccab572607fe42ca4ca723260eb8540bc3b18bd31a6cdc2aa2e35738400ae2d3c14dae4c0fa36a5a062eca4c4c03726599dfd3ec1c9651aee2153a3
|
|
7
|
+
data.tar.gz: c1503d963d3e9c5c4b8c508c1afc22fcdb08eb6cc095503245a56ea1d66da9fa644939d95ab5144f03106530aa7133d4383085a786b74dddbfc3341b8101de1f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
[no unreleased changes yet]
|
|
3
3
|
|
|
4
|
+
## v1.1.0 (2026-08-28)
|
|
5
|
+
- Don't include Git patch metadata as matching lines.
|
|
6
|
+
- Remove the hidden `--development` option. Use `bundle exec ruby exe/fcom` for development searches.
|
|
7
|
+
|
|
4
8
|
## v1.0.1 (2026-08-28)
|
|
5
9
|
- Don't include commits or files whose matches are only in diff context lines.
|
|
6
10
|
|
data/Gemfile.lock
CHANGED
|
@@ -10,7 +10,7 @@ GIT
|
|
|
10
10
|
PATH
|
|
11
11
|
remote: .
|
|
12
12
|
specs:
|
|
13
|
-
fcom (1.0
|
|
13
|
+
fcom (1.1.0)
|
|
14
14
|
activesupport (>= 6)
|
|
15
15
|
memo_wise (>= 1.7)
|
|
16
16
|
rainbow (>= 3.0)
|
|
@@ -177,7 +177,7 @@ CHECKSUMS
|
|
|
177
177
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
178
178
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
179
179
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
180
|
-
fcom (1.0
|
|
180
|
+
fcom (1.1.0)
|
|
181
181
|
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
182
182
|
io-console (0.9.2) sha256=efa74f891dd03c0939a931dfc6e74c2813d904763d456ea9762b0525e748db08
|
|
183
183
|
irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
|
data/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
This is a CLI tool that I use to parse the git history of a repo.
|
|
6
6
|
|
|
7
|
-
For example, if I use `fcom` to search this repo with `fcom
|
|
7
|
+
For example, if I use `fcom` to search this repo with `fcom 'rename.?\b' --commits 2 --author "David Runger"`, I get this output:
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
## Table of Contents
|
|
12
12
|
|
|
@@ -108,9 +108,7 @@ The performance of `fcom`'s querying and parsing of git history can significantl
|
|
|
108
108
|
|
|
109
109
|
## Development
|
|
110
110
|
|
|
111
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
|
|
112
|
-
the tests. You can also run `bin/console` for an interactive prompt that will allow you to
|
|
113
|
-
experiment.
|
|
111
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. To run a search using the local executable, use `bundle exec ruby exe/fcom`, for example `bundle exec ruby exe/fcom 'rename.?\b' --commits 2`. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
114
112
|
|
|
115
113
|
To install this gem onto your local machine, run (in this repository's root directory):
|
|
116
114
|
|
data/lib/fcom/options_helpers.rb
CHANGED
data/lib/fcom/parser.rb
CHANGED
|
@@ -22,7 +22,7 @@ class Fcom::Parser
|
|
|
22
22
|
end
|
|
23
23
|
regex =
|
|
24
24
|
Regexp.new(
|
|
25
|
-
"(
|
|
25
|
+
"\\A(?:[+-]\\s?.*(?:#{expression_to_match}).*|Omitted long (?:matching )?line)",
|
|
26
26
|
ignore_case? ? Regexp::IGNORECASE : nil,
|
|
27
27
|
)
|
|
28
28
|
|
|
@@ -45,6 +45,8 @@ class Fcom::Parser
|
|
|
45
45
|
when old_filename == new_filename then old_filename
|
|
46
46
|
else "#{old_filename} --> #{new_filename}"
|
|
47
47
|
end
|
|
48
|
+
elsif line.match?(%r{\A(?:---|\+\+\+) })
|
|
49
|
+
next
|
|
48
50
|
elsif line.match?(regex) && (filename.blank? || path_match?(filename))
|
|
49
51
|
if previous_commit
|
|
50
52
|
title, sha, author, date = previous_commit.split('|')
|
data/lib/fcom/querier.rb
CHANGED
|
@@ -116,9 +116,7 @@ class Fcom::Querier
|
|
|
116
116
|
#{@options[:rg_options]}
|
|
117
117
|
|
|
|
118
118
|
|
|
119
|
-
#{
|
|
120
|
-
File.join(__dir__, '../../exe/')
|
|
121
|
-
end}fcom #{quote}#{search_string}#{quote}
|
|
119
|
+
fcom #{quote}#{search_string}#{quote}
|
|
122
120
|
#{if days
|
|
123
121
|
"--days #{days}"
|
|
124
122
|
end}
|
data/lib/fcom/version.rb
CHANGED
data/lib/fcom.rb
CHANGED
|
@@ -79,7 +79,6 @@ class Fcom
|
|
|
79
79
|
)
|
|
80
80
|
options.bool('--debug', 'print debugging info', default: false)
|
|
81
81
|
options.bool('--parse-mode', 'whether we are in parse mode', default: false, help: false)
|
|
82
|
-
options.bool('--development', 'use local `fcom` executable', default: false, help: false)
|
|
83
82
|
end
|
|
84
83
|
end
|
|
85
84
|
end
|