From 1a50eeb8c1157142341ed2045a765a63b1740ebf Mon Sep 17 00:00:00 2001
From: S. Christoffer Eliesen <Christoffer.Eliesen@GMail.com>
Date: Thu, 24 Jun 2010 22:11:28 +0200
Subject: [PATCH] git_adapter.rb: Fix whitespace in git command.

The extra whitespace actually causes git to ignore the limit
identifier (identifier_to) even though it's supplied. This patch
fixes the whitespace and thus fixes the bug. Ticket #5628.
---
 lib/redmine/scm/adapters/git_adapter.rb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index d15bce1..66d2bd7 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -117,9 +117,9 @@ module Redmine
           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
+          cmd << " -n #{options[:limit]}" if options[:limit]
+          cmd << " #{shell_quote(identifier_from + '..') if identifier_from}" \
+            "#{shell_quote(identifier_to) if identifier_to}" if identifier_from or identifier_to
           cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since]
           cmd << " -- #{path}" if path && !path.empty?
 
-- 
1.7.0.4

