[PATCH 1/3] nmbug-status: simplify config file read from nmbug git

Subject: [PATCH 1/3] nmbug-status: simplify config file read from nmbug git

Date: Mon, 1 Apr 2013 12:44:00 +0300

To: notmuch@notmuchmail.org

Cc: Tomi Ollila

From: Jani Nikula


This should be functionally the same as before.
---
 devel/nmbug/nmbug-status |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index d08ca08..0283013 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -32,16 +32,8 @@ if args.config != None:
     fp = open(args.config)
 else:
     nmbhome = os.getenv('NMBGIT', os.path.expanduser('~/.nmbug'))
-
-    # read only the first line from the pipe
-    sha1 = subprocess.Popen(['git', '--git-dir', nmbhome,
-                             'show-ref', '-s', 'config'],
-                            stdout=subprocess.PIPE).stdout.readline()
-
-    sha1 = sha1.rstrip()
-
     fp = subprocess.Popen(['git', '--git-dir', nmbhome,
-                           'cat-file', 'blob', sha1+':status-config.json'],
+                           'show', 'config:status-config.json'],
                           stdout=subprocess.PIPE).stdout
 
 config = json.load(fp)
-- 
1.7.10.4


Thread: