From mboxrd@z Thu Jan 1 00:00:00 1970 From: skimo@liacs.nl Subject: [PATCH 03/22] git-config: add --remote option for reading config from remote repo Date: Thu, 24 May 2007 00:22:52 +0200 Message-ID: <11799589913274-git-send-email-skimo@liacs.nl> References: <11799589913153-git-send-email-skimo@liacs.nl> Cc: Martin Waitz , Alex Riesen To: git@vger.kernel.org, Junio C Hamano X-From: git-owner@vger.kernel.org Thu May 24 00:24:23 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1HqzFm-0003VS-Qr for gcvg-git@gmane.org; Thu, 24 May 2007 00:24:23 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757162AbXEWWXq (ORCPT ); Wed, 23 May 2007 18:23:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755981AbXEWWXq (ORCPT ); Wed, 23 May 2007 18:23:46 -0400 Received: from rhodium.liacs.nl ([132.229.131.16]:33750 "EHLO rhodium.liacs.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756540AbXEWWXh (ORCPT ); Wed, 23 May 2007 18:23:37 -0400 Received: from pc117b.liacs.nl (pc117b.liacs.nl [132.229.129.143]) by rhodium.liacs.nl (8.13.0/8.13.0/LIACS 1.4) with ESMTP id l4NMNB1v011548; Thu, 24 May 2007 00:23:16 +0200 Received: by pc117b.liacs.nl (Postfix, from userid 17122) id 9A6BC7DDA1; Thu, 24 May 2007 00:23:11 +0200 (CEST) X-Mailer: git-send-email 1.5.0.rc3.1762.g0934 In-Reply-To: <11799589913153-git-send-email-skimo@liacs.nl> Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: From: Sven Verdoolaege Signed-off-by: Sven Verdoolaege --- Documentation/git-config.txt | 27 ++++++++++++++++--------- builtin-config.c | 44 ++++++++++++++++++++++++++++++++--------- cache.h | 1 + config.c | 26 ++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 20 deletions(-) diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 827a499..549ef4e 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -9,16 +9,16 @@ git-config - Get and set repository or global options SYNOPSIS -------- [verse] -'git-config' [--system | --global] name [value [value_regex]] -'git-config' [--system | --global] --add name value -'git-config' [--system | --global] --replace-all name [value [value_regex]] -'git-config' [--system | --global] [type] --get name [value_regex] -'git-config' [--system | --global] [type] --get-all name [value_regex] -'git-config' [--system | --global] --unset name [value_regex] -'git-config' [--system | --global] --unset-all name [value_regex] -'git-config' [--system | --global] --rename-section old_name new_name -'git-config' [--system | --global] --remove-section name -'git-config' [--system | --global] -l | --list +'git-config' [scope] name [value [value_regex]] +'git-config' [scope] --add name value +'git-config' [scope] --replace-all name [value [value_regex]] +'git-config' [scope] [type] --get name [value_regex] +'git-config' [scope] [type] --get-all name [value_regex] +'git-config' [scope] --unset name [value_regex] +'git-config' [scope] --unset-all name [value_regex] +'git-config' [scope] --rename-section old_name new_name +'git-config' [scope] --remove-section name +'git-config' [scope] -l | --list DESCRIPTION ----------- @@ -33,6 +33,9 @@ existing values that match the regexp are updated or unset. If you want to handle the lines that do *not* match the regex, just prepend a single exclamation mark in front (see EXAMPLES). +The scope specifier can be either '--system', '--global' or +'--remote=[:]'. + The type specifier can be either '--int' or '--bool', which will make 'git-config' ensure that the variable(s) are of the given type and convert the value to the canonical form (simple decimal number for int, @@ -81,6 +84,10 @@ OPTIONS Use system-wide $(prefix)/etc/gitconfig rather than the repository .git/config. +--remote=[:]:]