Skip to content

Commit

Permalink
The --tree-size arg should always be an Integer (#6826)
Browse files Browse the repository at this point in the history
- Otherwise we can't `>= tree_size` further along in the chain.
  • Loading branch information
issyl0 committed May 14, 2024
1 parent 32ae1b4 commit d9b3140
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/git-linguist
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def git_linguist(args)

opts.on("-f", "--force", "Force a full rescan") { incremental = false }
opts.on("-c", "--commit=COMMIT", "Commit to index") { |v| commit = v}
opts.on("-t", "--tree-size=NUMBER", "Maximum number of files scanned to detect languages (default: 100,000)" ) { |t| tree_size = t }
opts.on("-t", "--tree-size=NUMBER", Integer, "Maximum number of files scanned to detect languages (default: 100,000)" ) { |t| tree_size = t }
end

parser.parse!(args)
Expand Down
2 changes: 1 addition & 1 deletion bin/github-linguist
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def github_linguist(args)
opts.on("-r", "--rev REV", String,
"Analyze specific git revision",
"defaults to HEAD, see gitrevisions(1) for alternatives") { |r| rev = r }
opts.on("-t", "--tree-size=NUMBER", "Maximum number of files scanned to detect languages (default: 100,000)") { |t| tree_size = t }
opts.on("-t", "--tree-size=NUMBER", Integer, "Maximum number of files scanned to detect languages (default: 100,000)") { |t| tree_size = t }
opts.on("-h", "--help", "Display a short usage summary, then exit") do
puts opts
exit
Expand Down

0 comments on commit d9b3140

Please sign in to comment.