Skip to content

Commit

Permalink
Added current directory handling to log command.
Browse files Browse the repository at this point in the history
  • Loading branch information
andymancooper committed Jun 23, 2010
1 parent 9b4ea9c commit 8d183d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Git/Commands/Log.cs
Expand Up @@ -36,10 +36,11 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

using GitSharp.Commands;
using System;
using System.Collections.Generic;
using NDesk.Options;
using GitSharp.Commands;
using System.IO;
using System.Linq;

namespace GitSharp.CLI
{
Expand Down Expand Up @@ -123,7 +124,9 @@ public override void Run(string[] args)
// log always uses a pager
SetupPager();

cmd.Arguments = arguments;
cmd.Arguments = arguments
.Select(path => Path.GetFullPath(path))
.ToList();
cmd.Execute();
}
catch (System.IO.IOException)
Expand Down
2 changes: 1 addition & 1 deletion GitSharp/Commands/LogCommand.cs
Expand Up @@ -659,7 +659,7 @@ public class LogCommand
public override void Execute()
{
if (Arguments.Count == 0)
Arguments.Add(".");
Arguments.Add(Directory.GetCurrentDirectory());
foreach (var commit in Repository.Get<AbstractTreeNode>(Arguments[0]).GetHistory())
{
ShowCommit(commit);
Expand Down

0 comments on commit 8d183d6

Please sign in to comment.