]> git.madduck.net Git - code/myrepos.git/blobdiff - mr

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 mr register to work when -c is specified using a relative path and
[code/myrepos.git] / mr
diff --git a/mr b/mr
index d7905b6f3a2b0c683f550a0132439ecea1b3e81c..e735b67b7335ce262ea327075636122ede8058f4 100755 (executable)
--- a/mr
+++ b/mr
@@ -90,6 +90,9 @@ Register an existing repository in the mrconfig file. By default, the
 repository in the current directory is registered, or you can specify a
 directory to register.
 
+By default it registers it to the ~/.mrconfig file. To make it write to a
+different file, use the -c option.
+
 =item config
 
 Adds, modifies, removes, or prints a value from the mrconfig file. The next
@@ -258,7 +261,7 @@ my %alias;
 Getopt::Long::Configure("no_permute");
 my $result=GetOptions(
        "d|directory=s" => sub { $directory=abs_path($_[1]) },
-       "c|config=s" => \$ENV{MR_CONFIG},
+       "c|config=s" => sub { $ENV{MR_CONFIG}=abs_path($_[1]) },
        "v|verbose" => \$verbose,
        "s|stats" => \$stats,
 );