]> 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:

* Make registration work when no config file yet exists. Closes: #448422
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 28 Oct 2007 23:55:02 +0000 (19:55 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 28 Oct 2007 23:55:02 +0000 (19:55 -0400)
debian/changelog
mr

index 2c7d823b6c04f2cc822e5e05595e4206c2ef513a..9e058259d37a2fdd4fc505dfde385cc9e682b3b5 100644 (file)
@@ -1,8 +1,9 @@
 mr (0.10) UNRELEASED; urgency=low
 
   * Add a lib file for using unison with mr.
+  * Make registration work when no config file yet exists. Closes: #448422
 
- -- Joey Hess <joeyh@debian.org>  Fri, 26 Oct 2007 03:57:51 -0400
+ -- Joey Hess <joeyh@debian.org>  Sun, 28 Oct 2007 19:54:31 -0400
 
 mr (0.9) unstable; urgency=low
 
diff --git a/mr b/mr
index 67196ca2046ca5b5f7d4acb18d7eafe3c793dbd2..ccc764744b10681e23f569864943069cfda227ed 100755 (executable)
--- a/mr
+++ b/mr
@@ -960,14 +960,19 @@ sub register { #{{{
                # Find the closest known mrconfig file to the current
                # directory.
                $directory.="/" unless $directory=~/\/$/;
+               my $foundconfig=0;
                foreach my $topdir (reverse sort keys %config) {
                        next unless length $topdir;
                        if ($directory=~/^\Q$topdir\E/) {
                                $ENV{MR_CONFIG}=$configfiles{$topdir};
                                $directory=$topdir;
+                               $foundconfig=1;
                                last;
                        }
                }
+               if (! $foundconfig) {
+                       $directory=""; # no config file, use builtin
+               }
        }
        if (@ARGV) {
                my $subdir=shift @ARGV;