diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-04 16:03:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-04 16:03:00 -0400 |
commit | 68670cad823def2bbd4f8ed294a5e2ba21bac41c (patch) | |
tree | bdb037aefaeb0aed1ed26b052e523a418e3bc67e /IkiWiki/Plugin/git.pm | |
parent | 49ef98505aa7ada6b1de81860c7e69b600b6c953 (diff) | |
download | ikiwiki-68670cad823def2bbd4f8ed294a5e2ba21bac41c.tar ikiwiki-68670cad823def2bbd4f8ed294a5e2ba21bac41c.tar.gz |
indentation
Diffstat (limited to 'IkiWiki/Plugin/git.pm')
-rw-r--r-- | IkiWiki/Plugin/git.pm | 34 |
1 files 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 { |