git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Oberndorfer <kumbayo84@arcor.de>
To: "Karl Hasselström" <kha@treskal.com>
Cc: Dan McGee <dpmcgee@gmail.com>,
	git@vger.kernel.org, Catalin Marinas <catalin.marinas@gmail.com>
Subject: [STGIT PATCH] replace "git repo-config" usage by "git config"
Date: Wed, 16 Jan 2008 21:58:26 +0100	[thread overview]
Message-ID: <200801162158.26450.kumbayo84@arcor.de> (raw)
In-Reply-To: <200801162147.33448.kumbayo84@arcor.de>

"git repo-config" will be removed soon

Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de>
---
since i am not good at creating log messages, feel free to change it :-)
built on top of kha experimental patch
passes all testcases for me
 stgit/config.py               |   14 +++++++-------
 t/t1900-mail.sh               |    2 +-
 t/t2100-pull-policy-fetch.sh  |    4 ++--
 t/t2101-pull-policy-pull.sh   |    4 ++--
 t/t2102-pull-policy-rebase.sh |    4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/stgit/config.py b/stgit/config.py
index 1d71cd2..9bfdd52 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -47,7 +47,7 @@ class GitConfig:
         if self.__cache.has_key(name):
             return self.__cache[name]
         try:
-            value = Run('git', 'repo-config', '--get', name).output_one_line()
+            value = Run('git', 'config', '--get', name).output_one_line()
         except RunException:
             value = self.__defaults.get(name, None)
         self.__cache[name] = value
@@ -56,7 +56,7 @@ class GitConfig:
     def getall(self, name):
         if self.__cache.has_key(name):
             return self.__cache[name]
-        values = Run('git', 'repo-config', '--get-all', name
+        values = Run('git', 'config', '--get-all', name
                      ).returns([0, 1]).output_lines()
         self.__cache[name] = values
         return values
@@ -71,23 +71,23 @@ class GitConfig:
     def rename_section(self, from_name, to_name):
         """Rename a section in the config file. Silently do nothing if
         the section doesn't exist."""
-        Run('git', 'repo-config', '--rename-section', from_name, to_name
+        Run('git', 'config', '--rename-section', from_name, to_name
             ).returns([0, 1]).run()
         self.__cache.clear()
 
     def remove_section(self, name):
         """Remove a section in the config file. Silently do nothing if
         the section doesn't exist."""
-        Run('git', 'repo-config', '--remove-section', name
+        Run('git', 'config', '--remove-section', name
             ).returns([0, 1]).discard_stderr().discard_output()
         self.__cache.clear()
 
     def set(self, name, value):
-        Run('git', 'repo-config', name, value).run()
+        Run('git', 'config', name, value).run()
         self.__cache[name] = value
 
     def unset(self, name):
-        Run('git', 'repo-config', '--unset', name)
+        Run('git', 'config', '--unset', name)
         self.__cache[name] = None
 
     def sections_matching(self, regexp):
@@ -96,7 +96,7 @@ class GitConfig:
         group contents, for all variable names matching the regexp.
         """
         result = []
-        for line in Run('git', 'repo-config', '--get-regexp', '"^%s$"' % regexp
+        for line in Run('git', 'config', '--get-regexp', '"^%s$"' % regexp
                         ).returns([0, 1]).output_lines():
             m = re.match('^%s ' % regexp, line)
             if m:
diff --git a/t/t1900-mail.sh b/t/t1900-mail.sh
index e83b2d3..cfdc6f3 100755
--- a/t/t1900-mail.sh
+++ b/t/t1900-mail.sh
@@ -6,7 +6,7 @@ test_description='Test the mail command'
 test_expect_success \
     'Initialize the StGIT repository' \
     '
-    git repo-config stgit.sender "A U Thor <author@example.com>" &&
+    git config stgit.sender "A U Thor <author@example.com>" &&
     for i in 1 2 3 4 5; do
       touch foo.txt &&
       echo "line $i" >> foo.txt &&
diff --git a/t/t2100-pull-policy-fetch.sh b/t/t2100-pull-policy-fetch.sh
index 9e4bc31..670c7c6 100755
--- a/t/t2100-pull-policy-fetch.sh
+++ b/t/t2100-pull-policy-fetch.sh
@@ -19,8 +19,8 @@ test_expect_success \
     (cd upstream && stg init) &&
     stg clone upstream clone &&
     (cd clone &&
-     git repo-config branch.master.stgit.pull-policy fetch-rebase &&
-     git repo-config --list &&
+     git config branch.master.stgit.pull-policy fetch-rebase &&
+     git config --list &&
      stg new c1 -m c1 &&
      echo a > file && git add file && stg refresh
     )
diff --git a/t/t2101-pull-policy-pull.sh b/t/t2101-pull-policy-pull.sh
index b4521f0..ce4b5c8 100755
--- a/t/t2101-pull-policy-pull.sh
+++ b/t/t2101-pull-policy-pull.sh
@@ -19,8 +19,8 @@ test_expect_success \
     (cd upstream && stg init) &&
     stg clone upstream clone &&
     (cd clone &&
-     git repo-config branch.master.stgit.pull-policy pull &&
-     git repo-config --list &&
+     git config branch.master.stgit.pull-policy pull &&
+     git config --list &&
      stg new c1 -m c1 &&
      echo a > file && git add file && stg refresh
     )
diff --git a/t/t2102-pull-policy-rebase.sh b/t/t2102-pull-policy-rebase.sh
index 135b48c..5619bda 100755
--- a/t/t2102-pull-policy-rebase.sh
+++ b/t/t2102-pull-policy-rebase.sh
@@ -13,8 +13,8 @@ test_expect_success \
     git branch -m master parent &&
     stg init &&
     stg branch --create stack &&
-    git repo-config branch.stack.stgit.pull-policy rebase &&
-    git repo-config --list &&
+    git config branch.stack.stgit.pull-policy rebase &&
+    git config --list &&
     stg new c1 -m c1 &&
     echo a > file && git add file && stg refresh
     '
-- 
1.5.4.rc3

  reply	other threads:[~2008-01-16 21:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16  3:19 [RFC/PATCH] Remove repo-config Dan McGee
2008-01-16  4:23 ` Junio C Hamano
2008-01-16  4:40   ` Dan McGee
2008-01-16 17:20     ` Junio C Hamano
2008-01-16 20:32       ` Junio C Hamano
2008-01-16 20:13 ` Junio C Hamano
2008-01-16 20:47 ` Peter Oberndorfer
2008-01-16 20:58   ` Peter Oberndorfer [this message]
2008-01-16 21:13     ` [STGIT PATCH] replace "git repo-config" usage by "git config" Jakub Narebski
2008-01-16 21:46       ` Peter Oberndorfer
2008-01-17 17:07       ` Catalin Marinas
2008-01-17 23:49         ` Jakub Narebski
2008-01-17  7:45     ` Karl Hasselström
2008-01-18  4:24       ` Karl Hasselström
2008-01-23 11:35         ` Catalin Marinas
2008-01-23 16:10           ` Karl Hasselström
2008-01-23 16:42             ` Catalin Marinas
2008-01-24  7:01               ` Karl Hasselström
2008-01-24 15:31                 ` Catalin Marinas
2008-01-24 18:08                   ` Karl Hasselström
2008-01-24 18:20                     ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801162158.26450.kumbayo84@arcor.de \
    --to=kumbayo84@arcor.de \
    --cc=catalin.marinas@gmail.com \
    --cc=dpmcgee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).