From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: [PATCHv4 5/5] am, rebase: teach quiet option Date: Tue, 16 Jun 2009 15:33:01 -0700 Message-ID: <1245191581-11127-6-git-send-email-bebarino@gmail.com> References: <1245117905-19351-1-git-send-email-bebarino@gmail.com> <1245191581-11127-1-git-send-email-bebarino@gmail.com> <1245191581-11127-2-git-send-email-bebarino@gmail.com> <1245191581-11127-3-git-send-email-bebarino@gmail.com> <1245191581-11127-4-git-send-email-bebarino@gmail.com> <1245191581-11127-5-git-send-email-bebarino@gmail.com> Cc: Thomas Adam , Junio C Hamano , Johannes Sixt To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Jun 17 00:34:21 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1MGhEQ-0001yF-Il for gcvg-git-2@gmane.org; Wed, 17 Jun 2009 00:34:19 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757402AbZFPWdb (ORCPT ); Tue, 16 Jun 2009 18:33:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756916AbZFPWda (ORCPT ); Tue, 16 Jun 2009 18:33:30 -0400 Received: from wf-out-1314.google.com ([209.85.200.170]:27231 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760681AbZFPWdP (ORCPT ); Tue, 16 Jun 2009 18:33:15 -0400 Received: by wf-out-1314.google.com with SMTP id 26so1945096wfd.4 for ; Tue, 16 Jun 2009 15:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=oaXZO7KH0lIFeE9S0HBxQniWXNaIY4YvlvN3yGMfgtA=; b=Ph/1ftdJl5Op4HGjFXnqVwwucxL3FDzE9gunGpwnQLPNsXyA6JESpfOyVQ2lRVvc25 glbAGuzdwwCeTIMFvOMAe+7GP8RyPKPrPrukR5dWq1K66KdMlZeoqbmqmxG+fpv+H2/c 6fOAXrsvfaQyTonPLV+Xg2lYzymqVuZjHci8A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=KwZEEm92EM1tTgUzdGfmVP/s8depUW3gYiXi9kYiazChVePRE/bYZqp6zSYSMi659w mmBE6bwtI6to8dd4TyH5b/z/IplPAdepuoEYqhyV8YVWQnxcl5JXt/J7zlCuHgijB+bn Qg0mDyH+NSubYTfZmn+1b3Aue82wo71VMx7xQ= Received: by 10.142.58.20 with SMTP id g20mr4843933wfa.20.1245191597519; Tue, 16 Jun 2009 15:33:17 -0700 (PDT) Received: from earth (user-0c9haco.cable.mindspring.com [24.152.169.152]) by mx.google.com with ESMTPS id 28sm837792wfd.23.2009.06.16.15.33.15 (version=SSLv3 cipher=RC4-MD5); Tue, 16 Jun 2009 15:33:17 -0700 (PDT) Received: by earth (sSMTP sendmail emulation); Tue, 16 Jun 2009 15:33:14 -0700 X-Mailer: git-send-email 1.6.3.2.306.g4f4fa In-Reply-To: <1245191581-11127-5-git-send-email-bebarino@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: git-am and git-rebase are talkative scripts. Teach them to be quiet when told, allowing them to speak only when they fail or experience errors. The quiet option is maintained when git-am or git-rebase fails to apply a patch. This means subsequent --resolved, --continue, --skip, --abort invocations will be quiet if the original invocation was quiet. Drop a couple >&2 statements because Junio has deemed them unnecessary. Signed-off-by: Stephen Boyd --- Copied from cover letter for convenience: - say "applying to an empty history" in am.sh - quiet merge in rebase.sh::call_merge() - drop >&2 in a couple places in rebase.sh - maintain GIT_QUIET when git-am or git-rebase fails - add to git_am_opt instead of hijacking GIT_QUIET in rebase.sh I chose GIT_MERGE_VERBOSITY=1 in rebase because the resolvemsg says "correct the above error", and GIT_MERGE_VERBOSITY=0 prints nothing. I think this might be a bug, either in the documentation or in merge-recursive. At least setting it to 1 prints "CONFLICT (content): ..." This behavior was observed by passing -q to rebase in t3407. Documentation/git-am.txt | 6 ++++- Documentation/git-rebase.txt | 4 +++ git-am.sh | 26 ++++++++++++++++------ git-rebase.sh | 48 +++++++++++++++++++++++++++++++++-------- t/t3400-rebase.sh | 19 +++++++++++----- t/t4150-am.sh | 18 +++++++++++++++ 6 files changed, 97 insertions(+), 24 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 6d92cbe..32e689b 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -13,7 +13,7 @@ SYNOPSIS [--3way] [--interactive] [--committer-date-is-author-date] [--ignore-date] [--whitespace=