]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

* Fix a bug in inheritance of default settings in chained .mrconfig files.
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 16 Oct 2007 05:41:03 +0000 (01:41 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 16 Oct 2007 05:41:03 +0000 (01:41 -0400)
debian/changelog
mr

index a6e1e9b54b7f8315cdaa3c201fc6d3c5056ce8ce..ea49785695ec763ef5c95c7283efd494b9412c51 100644 (file)
@@ -1,8 +1,9 @@
 mr (0.2) UNRELEASED; urgency=low
 
   * Fix line number display for config file parse errors.
 mr (0.2) UNRELEASED; urgency=low
 
   * Fix line number display for config file parse errors.
+  * Fix a bug in inheritance of default settings in chained .mrconfig files.
 
 
- -- Joey Hess <joeyh@debian.org>  Sun, 14 Oct 2007 19:03:22 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue, 16 Oct 2007 01:40:32 -0400
 
 mr (0.1) unstable; urgency=low
 
 
 mr (0.1) unstable; urgency=low
 
diff --git a/mr b/mr
index e29e3679bd75aa9a11a9e2b44d1d9f286a65e63d..adc05464671b0644be5e04b2b8167c6b89202cb6 100755 (executable)
--- a/mr
+++ b/mr
@@ -518,7 +518,10 @@ sub loadconfig { #{{{
 
                # copy in defaults from first parent
                my $parent=$dir;
 
                # copy in defaults from first parent
                my $parent=$dir;
-               while ($parent=~s/^(.*)\/[^\/]+\/?$/$1/) {
+               while ($parent=~s/^(.*\/)[^\/]+\/?$/$1/) {
+                       if ($parent eq '/') {
+                               $parent="";
+                       }
                        if (exists $config{$parent} &&
                            exists $config{$parent}{DEFAULT}) {
                                $config{$dir}{DEFAULT}={ %{$config{$parent}{DEFAULT}} };
                        if (exists $config{$parent} &&
                            exists $config{$parent}{DEFAULT}) {
                                $config{$dir}{DEFAULT}={ %{$config{$parent}{DEFAULT}} };