Actions
Defect #5628
closedWrong commit range in git log command
Start date:
2010-06-01
Due date:
% Done:
100%
Estimated time:
Resolution:
Affected version:
Description
Special file:
lib/redmine/scm/adapters/git_adapter.rb
Special coding:
def revisions(path, identifier_from, identifier_to, options={}) revisions = Revisions.new cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller" cmd << " --reverse" if options[:reverse] cmd << " --all" if options[:all] cmd << " -n #{options[:limit]} " if options[:limit] cmd << " #{shell_quote(identifier_from + '..')} " if identifier_from cmd << " #{shell_quote identifier_to} " if identifier_to
the correct git log command are following:
git log identifier_from..identifier_to
but the above coding result is
git log identifier_from.. identifier_to
It lead to that all log from identifier_from will be displayed. All of these are caused by extra spaces, which leads to git ignore identifier_to as the limit of the range.
Example:
git log 2efdef32^..2efdef32 Only 2efdef32 commit will be displayed. git log 2efdef32^.. 2efdef32 All commits from 2efdef32 will displayed.
Files
Related issues
Actions