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

Jani Nikula jani at nikula.org
Mon Apr 1 02:44:00 PDT 2013


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



More information about the notmuch mailing list