Class: Command::Log
Constant Summary
Constants included from PrintDiff
PrintDiff::DIFF_FORMATS, PrintDiff::NULL_OID, PrintDiff::NULL_PATH
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from PrintDiff
Methods inherited from Base
Constructor Details
This class inherits a constructor from Command::Base
Instance Method Details
#define_options ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/command/log.rb', line 10 def @rev_list_opts = {} @parser.on("--all") { @rev_list_opts[:all] = true } @parser.on("--branches") { @rev_list_opts[:branches] = true } @parser.on("--remotes") { @rev_list_opts[:remotes] = true } @options[:decorate] = "auto" @options[:abbrev] = :auto @options[:format] = "medium" @options[:patch] = false @parser.on "--decorate[=<format>]" do |format| @options[:decorate] = format || "short" end @parser.on "--no-decorate" do @options[:decorate] = "no" end @parser.on "--[no-]abbrev-commit" do |value| @options[:abbrev] = value end @parser.on "--pretty=<format>", "--format=<format>" do |format| @options[:format] = format end @parser.on "--oneline" do @options[:abbrev] = true if @options[:abbrev] == :auto @options[:format] = "oneline" end @parser.on "--cc" do @options[:combined] = @options[:patch] = true end end |