From 68670cad823def2bbd4f8ed294a5e2ba21bac41c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Oct 2010 16:03:00 -0400 Subject: indentation --- IkiWiki/Plugin/git.pm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b6ed61428..a0f9b15a7 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -724,25 +724,27 @@ sub rcs_getmtime ($) { { my $git_root; + sub git_find_root { - # The wiki may not be the only thing in the git repo. - # Determine if it is in a subdirectory by examining the srcdir, - # and its parents, looking for the .git directory. - - return $git_root if defined $git_root; - - my $subdir=""; - my $dir=$config{srcdir}; - while (! -d "$dir/.git") { - $subdir=IkiWiki::basename($dir)."/".$subdir; - $dir=IkiWiki::dirname($dir); - if (! length $dir) { - error("cannot determine root of git repo"); - } - } + # The wiki may not be the only thing in the git repo. + # Determine if it is in a subdirectory by examining the srcdir, + # and its parents, looking for the .git directory. + + return $git_root if defined $git_root; + + my $subdir=""; + my $dir=$config{srcdir}; + while (! -d "$dir/.git") { + $subdir=IkiWiki::basename($dir)."/".$subdir; + $dir=IkiWiki::dirname($dir); + if (! length $dir) { + error("cannot determine root of git repo"); + } + } - return $subdir; + return $subdir; } + } sub git_parse_changes { -- cgit v1.2.3