Skip to content

Commit

Permalink
Finished off the last piece of legacy URL support.
Browse files Browse the repository at this point in the history
  • Loading branch information
broquaint committed Mar 31, 2010
1 parent acbba30 commit 3e6d533
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/Gitalist/ActionRole/FilenameArgs.pm
Expand Up @@ -7,7 +7,7 @@ requires 'execute';
before 'execute' => sub {
my ($self, $controller, $c, @args) = @_;
$c->stash->{filename} = join('/', @args) || ''
unless $c->stash->{filename};
unless $c->stash->{filename};
};

1;
Expand Down
8 changes: 4 additions & 4 deletions lib/Gitalist/Git/Repository.pm
Expand Up @@ -128,7 +128,7 @@ class Gitalist::Git::Repository with Gitalist::Git::HasUtils {
or return;
my $line = $paths[0];

#'100644 blob 0fa3f3a66fb6a137f6ec2c19351ed4d807070ffa panic.c'
#'100644 blob 0fa3f3a66fb6a137f6ec2c19351ed4d807070ffa panic.c'
$line =~ m/^([0-9]+) (.+) ($SHA1RE)\t/;
return defined $type && $type ne $2
? ()
Expand All @@ -147,7 +147,7 @@ class Gitalist::Git::Repository with Gitalist::Git::HasUtils {
if ($search) {
$search->{type} = 'grep'
if $search->{type} eq 'commit';
no warnings; # where's this warning coming from?
no warnings; # where's this warning coming from?
@search_opts = (
# This seems a little fragile ...
qq[--$search->{type}=$search->{text}],
Expand Down Expand Up @@ -257,8 +257,8 @@ class Gitalist::Git::Repository with Gitalist::Git::HasUtils {
$description = $self->path->file('description')->slurp;
chomp $description;
};
$description = "Unnamed repository, edit the .git/description file to set a description"
if $description eq "Unnamed repository; edit this file 'description' to name the repository.";
$description = "Unnamed repository, edit the .git/description file to set a description"
if $description eq "Unnamed repository; edit this file 'description' to name the repository.";
return $description;
}

Expand Down
6 changes: 3 additions & 3 deletions lib/Gitalist/URIStructure/Ref.pm
Expand Up @@ -31,9 +31,9 @@ sub _set_diff_args {

# FIXME - This ain't pretty
$c->stash(parent => shift @rest)
if @rest == 2
# Check that the single arg is unlikely to be a path.
or @rest && to_SHA1($rest[0]) && $c->stash->{Repository}->get_object_or_head($rest[0]);
if @rest == 2
# Check that the single arg is unlikely to be a path.
or @rest && to_SHA1($rest[0]) && $c->stash->{Repository}->get_object_or_head($rest[0]);
$c->stash(filename => $rest[-1])
if @rest;
}
Expand Down
2 changes: 1 addition & 1 deletion t/02git_Repository.t
Expand Up @@ -18,7 +18,7 @@ BEGIN {
};
*CORE::GLOBAL::getpwuid = sub {
wantarray
? ("test", "x", "1000", "1000", "", "", "T\x{c3}\x{a9}st", "/home/test", "/bin/bash")
? ("test", "x", "1000", "1000", "", "", "T\x{c3}\x{a9}st", "/home/test", "/bin/bash")
: "test";
};
};
Expand Down

0 comments on commit 3e6d533

Please sign in to comment.