Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 789DC429E51 for ; Mon, 1 Apr 2013 02:44:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BSz56q8DBGvL for ; Mon, 1 Apr 2013 02:44:16 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D101E429E55 for ; Mon, 1 Apr 2013 02:44:12 -0700 (PDT) Received: by mail-la0-f41.google.com with SMTP id fo12so1989160lab.0 for ; Mon, 01 Apr 2013 02:44:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=MzdJyvHgpK95WMmwkD5Kr8CXmCCl/zx0jM1n9yaxVao=; b=All8NXZaEx+DZNuCFBEKHElKIL5t6iYMm+dDYJMFYrAICLJuwvAd2TsfBqV35C/c3X OwwCwUOzilQinQ2hiXWPDK/qxeY8TB9cBya5neeCKjyu9YhwBeyonIMBMGV9cJaXzHG3 fngY9i/dmeHXe0ZW+btn+AbKg3iZNjomksACtVQb2/ti7hPYdo/Ck3lwfPGbPZbFSvoy qaqyBGiVRP4CGK2TfKaoEZNY1EebrJTEKH/IW91Eu5RfPshZDjJEcB2CJkRCbEnABzn1 eN6+HyQN7NjF3GPPsGLlpBQqjMN36yC9h47oL/9FOEC55aatoXe1RSAi4V/M2nBgD7oj urIg== X-Received: by 10.152.132.138 with SMTP id ou10mr5412514lab.56.1364809448575; Mon, 01 Apr 2013 02:44:08 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id pk1sm5312387lab.0.2013.04.01.02.44.06 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 02:44:07 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 1/3] nmbug-status: simplify config file read from nmbug git Date: Mon, 1 Apr 2013 12:44:00 +0300 Message-Id: <41d8f64a00a516faaa51871e2cb060bb1d0c8a8a.1364809172.git.jani@nikula.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQnfDtMdEt8zCEeWpbm95kFB2C4UcUOEqfmCUhyB7Iz/TFJ2e9ZlVAOQBjKlvy/vbjA9twtn Cc: Tomi Ollila X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 09:44:18 -0000 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