chiark / gitweb /
directory refactoring: Rename no_local_git_cfg
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Aug 2017 18:56:40 +0000 (19:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Aug 2017 08:57:52 +0000 (09:57 +0100)
This is actually called when we don't know that we are starting in a
git tree.  We want to use this knowledge to control an automatic call
to record_maindir, too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index bc84afb5c04ef269dc8571bbec289b95a9fb0741..9aadaf0d4753c5231c0d3d6ea95c05311397e4f0 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -557,7 +557,7 @@ sub nextarg {
 }
 
 sub pre_help () {
-    no_local_git_cfg();
+    not_necessarily_a_tree();
 }
 sub cmd_help () {
     print $helpmsg or die $!;
@@ -681,7 +681,7 @@ sub cfg {
        "$us: distro or suite appears not to be (properly) supported";
 }
 
-sub no_local_git_cfg () {
+sub not_necessarily_a_tree () {
     # needs to be called from pre_*
     @gitcfgsources = grep { $_ ne 'local' } @gitcfgsources;
 }
@@ -4378,7 +4378,7 @@ END
 }
 
 sub pre_clone () {
-    no_local_git_cfg();
+    not_necessarily_a_tree();
 }
 sub cmd_clone {
     parseopts();
@@ -4592,7 +4592,7 @@ sub i_method {
 }
 
 sub pre_rpush () {
-    no_local_git_cfg();
+    not_necessarily_a_tree();
 }
 sub cmd_rpush {
     my $host = nextarg;
@@ -6369,7 +6369,7 @@ END
 }
 
 sub pre_archive_api_query () {
-    no_local_git_cfg();
+    not_necessarily_a_tree();
 }
 sub cmd_archive_api_query {
     badusage "need only 1 subpath argument" unless @ARGV==1;
@@ -6388,7 +6388,7 @@ sub repos_server_url () {
 }    
 
 sub pre_clone_dgit_repos_server () {
-    no_local_git_cfg();
+    not_necessarily_a_tree();
 }
 sub cmd_clone_dgit_repos_server {
     badusage "need destination argument" unless @ARGV==1;
@@ -6400,7 +6400,7 @@ sub cmd_clone_dgit_repos_server {
 }
 
 sub pre_print_dgit_repos_server_source_url () {
-    no_local_git_cfg();
+    not_necessarily_a_tree();
 }
 sub cmd_print_dgit_repos_server_source_url {
     badusage "no arguments allowed to dgit print-dgit-repos-server-source-url"