From patchwork Tue May 5 01:39:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 11528005 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A39771668 for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8AAB0206B9 for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SW6YSFtA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbgEEBjm (ORCPT ); Mon, 4 May 2020 21:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726516AbgEEBjl (ORCPT ); Mon, 4 May 2020 21:39:41 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 679AEC061A0F for ; Mon, 4 May 2020 18:39:41 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id v63so90807pfb.10 for ; Mon, 04 May 2020 18:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P1mIXTyxQXGDDIcHxeiomhmFzzers4Cd+5PsN1wDPv4=; b=SW6YSFtAhXUE5zxhLK2uaco5gdc6vTJO/8aUhjQIRr/bomq8LYlPQTW4mHweMjPqpC je5J2aAJNLqr562CkzSEH0f57wE/KUyEV5M1Wl1syUFGLCagQueVQPbj96TdOqplCQAk H5zKyB5xEqttXqvitL+qDhD+9WJTUUHhThBGhyxNEaQL5H5wCYCUiUjfzwGPG6tHwD9B KW4xVKXWVpOgc7iTTA9cfZefGYeegxqYIWMxsBXu4UfhpQwMZ0vHxrwcszMZHQPDKBBb ctj8eqLeWe6ib6+e6kQcUKkfQWce86d9jdLwZWyICm84no3+wA+aZbnr7CL6hPNErjg5 59Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P1mIXTyxQXGDDIcHxeiomhmFzzers4Cd+5PsN1wDPv4=; b=k18bt31tmJrPRip+fWsAw4PEOj9skxZlcIBarETBPhWGkrCLwJfCleY00Y7WPOhHBW 8b3RiNz4mNtOobrnPFgDhvrX4m96RBte/nDaBgww7VaaiFhMqRFQRNPtNYZv+HHDYf/V t0xfImQ5Y0jViNOBMfLvv8rY/h4Lr+I4dKAYvQooKE7Y5zswp68tPw6JQZ+d9gDTlEXq P1repLHz19iVcafdH9VWdO51YUk1V4BpPTdEZvXhRf+lc9Lf/uchZzH1I8e9UUdZE9GZ TIRTqo+gpeFzomqiHWLKl42Vnvrm+QNX77/qpHj/hEy69W+lND5p6us7YGAsRt3E7Ntr CEkw== X-Gm-Message-State: AGi0PuZS2KkLhB8qNrU4PK9RPE+RaucZtrsfAgC/gAlEMFX/u8Sx6hDx e2gSlaeDnEPdHT8d+Et4C1OUV4rW X-Google-Smtp-Source: APiQypJK2h9y2+mL5KRbykAP3420LZBYkhvIuQLQ2T09l+kOEw62d+6s9i7ofjtrw1renxoukF5omg== X-Received: by 2002:a62:e418:: with SMTP id r24mr791327pfh.86.1588642780571; Mon, 04 May 2020 18:39:40 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id e196sm352027pfh.43.2020.05.04.18.39.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2020 18:39:40 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: peff@peff.net, jrnieder@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 1/4] credential: update description for credential_from_url_gently Date: Mon, 4 May 2020 18:39:05 -0700 Message-Id: <20200505013908.4596-2-carenas@gmail.com> X-Mailer: git-send-email 2.26.2.686.gfaf46a9ccd In-Reply-To: <20200505013908.4596-1-carenas@gmail.com> References: <20200503063423.83152-1-carenas@gmail.com> <20200505013908.4596-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org c44088ecc4 (credential: treat URL without scheme as invalid, 2020-04-18) changes the implementation for this function to return -1 if protocol is missing. Update blurb to match implementation. Reviewed-by: Jeff King Signed-off-by: Carlo Marcelo Arenas Belón --- credential.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/credential.h b/credential.h index d99ec42b2a..f51703d9ce 100644 --- a/credential.h +++ b/credential.h @@ -177,8 +177,8 @@ void credential_write(const struct credential *, FILE *); * Parse a url into a credential struct, replacing any existing contents. * * If the url can't be parsed (e.g., a missing "proto://" component), the - * resulting credential will be empty but we'll still return success from the - * "gently" form. + * resulting credential will be empty and the function will return an + * error (even in the "gently" form). * * If we encounter a component which cannot be represented as a credential * value (e.g., because it contains a newline), the "gently" form will return From patchwork Tue May 5 01:39:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 11528007 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF4B714B4 for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7CB0206EB for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oAalX+HK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727786AbgEEBjp (ORCPT ); Mon, 4 May 2020 21:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726516AbgEEBjo (ORCPT ); Mon, 4 May 2020 21:39:44 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83F5AC061A0F for ; Mon, 4 May 2020 18:39:43 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id w3so161022plz.5 for ; Mon, 04 May 2020 18:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Rdd23K0VKYArxPfWBu9HOIWcLwj56JRKrRMqxp2eb6U=; b=oAalX+HKNsIdHtiC1q2iYZOLzU76FjjgFMK0zyKeca+cxA0/zxNdJwUnmPymm0agA+ 6Nm7DU3p/CVi+lcQyHQpr54ujrQcvzqvJEGPHPtvmOP6o7Ap3P3dFMiwnEAOxOP/cQmH abObbRmhHfDMyv9FaLbuWHVfhGpl895mQKN1F5wXTvLxy/i4gNHKXOMIcPuHJMyZFS6P h1ps+p+yvYPLMNVgSBdKdLr/SggAw8bOKIEdG9Hr3pK/R2mv6vU8AO/CA4gpekPGxHcX hjtqzl1HXn/97T4NzucTzynPDYFQon2TNQRbCSiq/hrPSyN0wQ+rsHJZqUOMecFatMgq lRnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rdd23K0VKYArxPfWBu9HOIWcLwj56JRKrRMqxp2eb6U=; b=bcrfIPWy5EC/+ZubpLmrjxlZrce/2881MfM8cAYGq233fzB2ehWCwoweSfgzKWf38C S7c8Zf2esMSCBhUqsd2DPbalL/i+YXV0oN9+/KNQjhmJtfLoeZwgDuBh6NGSKqf3OEN6 sz9EsQR3gF4IlrrtuGZCmue+WVzGxFjTqf3c6Jqn7ZjI5MCPX8wB/5E1EUUIwJGPd/LS SxeYoO0UsoRSt21JZLQOT9ooS/O7WbXecKppeniE7w0GVZbUqbVHV1KKs2IiJ4t65ZX3 Y4Mcqp1+BwZuW6Qm/NUqZcRyAfq9BZUEg2hOSr+GDUJujTNiQ5aAgd2kxA/kdDZgmnOl i9DA== X-Gm-Message-State: AGi0PuavYTagoQziDd3YaxEltNsV9TrbkoixiQ6F3ICRYxgLy8WkMdWL /IhoII4WUYbdfCrOws2Yz0oqnf0K X-Google-Smtp-Source: APiQypKCuuwX3bAB1LKnwJkKZZ+iVjkzj/AaIaBQiOo1LM0eLr+bly5kZEglkUHfZ5p8xy+hK1uS7A== X-Received: by 2002:a17:902:b58e:: with SMTP id a14mr505734pls.247.1588642782780; Mon, 04 May 2020 18:39:42 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id e196sm352027pfh.43.2020.05.04.18.39.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2020 18:39:42 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: peff@peff.net, jrnieder@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 2/4] credential: correct order of parameters for credential_match Date: Mon, 4 May 2020 18:39:06 -0700 Message-Id: <20200505013908.4596-3-carenas@gmail.com> X-Mailer: git-send-email 2.26.2.686.gfaf46a9ccd In-Reply-To: <20200505013908.4596-1-carenas@gmail.com> References: <20200503063423.83152-1-carenas@gmail.com> <20200505013908.4596-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since the beginning in 118250728e (credential: apply helper config, 2011-12-10), the declaration for that function used a different order than the implementation. All callers use the same order than the implementation, so update the declaration in credential.h to match. Reviewed-by: Jeff King Signed-off-by: Carlo Marcelo Arenas Belón --- credential.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/credential.h b/credential.h index f51703d9ce..c0e17e3554 100644 --- a/credential.h +++ b/credential.h @@ -189,7 +189,7 @@ void credential_write(const struct credential *, FILE *); void credential_from_url(struct credential *, const char *url); int credential_from_url_gently(struct credential *, const char *url, int quiet); -int credential_match(const struct credential *have, - const struct credential *want); +int credential_match(const struct credential *want, + const struct credential *have); #endif /* CREDENTIAL_H */ From patchwork Tue May 5 01:39:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 11528009 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCA001862 for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4E06206B9 for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XVGcc38P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727805AbgEEBjr (ORCPT ); Mon, 4 May 2020 21:39:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726516AbgEEBjq (ORCPT ); Mon, 4 May 2020 21:39:46 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ABD6C061A0F for ; Mon, 4 May 2020 18:39:45 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id l12so287176pgr.10 for ; Mon, 04 May 2020 18:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F50CeH/2zQj0c7Y0mkrkl8Tq74PEjdpt5RTCDCHlRqk=; b=XVGcc38PVg0pBVk5+Rq9rgK5O0Ay6dW35biPa9pX3x5Xx9kyV+w4ul4D41Obbkmzwd is4XPWaA0d8lb47hrN28fZHMbaVNPgcM+eefQOkWtRaS/abiBn+gEpcse+n9uQ0pVNS9 kwv2m9gCN58wItNlUWN5T5QDschkFMFSVdMvVfiklN+nb5NAxwSx1PuUxQ7m6mOa+HLM BoAuKDpztBsCqskRDeqkff2pqdza1+V/tAFFmxjZ1yTGWyru/VjFVlCN6JqLumKDvM96 HOdwhibcS1A8GWTLv3CJpoQiW4F0Jb0XGHYv1lBV13S5bAXPEd+/OEM7vipgVmF1xRq1 RSUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F50CeH/2zQj0c7Y0mkrkl8Tq74PEjdpt5RTCDCHlRqk=; b=dN9g3lqB29qNSbfSxdbE5jpm3xkNhJcWyDjYccRnaykTZAqymbWdg5TsNDrSIQj+BR PetG9iR5WGpA5gE/tLu43gxAQ2eXpOg5cOzHZZee8v3+9lJAZcLiIDp4fXleQZm0BUfk Vjz473ht+hUblDhNgRFOW8PkzCBThup3u83eXaWi3gpuQx3hIMkOmz3v+UV85J+/E72k 8WD33LWKIZVfaSFe+YB5FZGwJ3rTfaqxdWJY2Zr7sbtgEUEYYcy2VEH4ToPYETyPtQTv 07TZ1vTojFDM3f34dxUne3tpnswGB/XEB4NRNnCMOQUUv0f0Aier4y+YkMyE5BureSBP Ht3w== X-Gm-Message-State: AGi0PuZ1afqvOgAbmBqQvjpqwzS8QvLXJJdUtDLUceym3XAYY/mDgzDq IeqEKB+TvrfEEuGl/j0zLd0q6Zje X-Google-Smtp-Source: APiQypIskhh55ZSiMiljhKDYy56A10Il84zNAMBjYXnfTfyHtEzlUrwcJcOcwbP51gXViKkefWmpPQ== X-Received: by 2002:a63:4a54:: with SMTP id j20mr953039pgl.430.1588642784639; Mon, 04 May 2020 18:39:44 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id e196sm352027pfh.43.2020.05.04.18.39.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2020 18:39:44 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: peff@peff.net, jrnieder@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 3/4] credential: update gitcredentials documentation Date: Mon, 4 May 2020 18:39:07 -0700 Message-Id: <20200505013908.4596-4-carenas@gmail.com> X-Mailer: git-send-email 2.26.2.686.gfaf46a9ccd In-Reply-To: <20200505013908.4596-1-carenas@gmail.com> References: <20200503063423.83152-1-carenas@gmail.com> <20200505013908.4596-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Clarify the expected effect of all attributes and how the helpers are expected to handle them and the context where they operate. While at it, space the descriptions for clarity, and add a paragraph mentioning the early termination in the list processing of helpers, to complement the one about the special "quit" attribute. Signed-off-by: Carlo Marcelo Arenas Belón --- Documentation/gitcredentials.txt | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt index 1814d2d23c..72faadae9e 100644 --- a/Documentation/gitcredentials.txt +++ b/Documentation/gitcredentials.txt @@ -262,16 +262,26 @@ For a `get` operation, the helper should produce a list of attributes on stdout in the same format (see linkgit:git-credential[1] for common attributes). A helper is free to produce a subset, or even no values at all if it has nothing useful to provide. Any provided attributes will -overwrite those already known about by Git. If a helper outputs a -`quit` attribute with a value of `true` or `1`, no further helpers will -be consulted, nor will the user be prompted (if no credential has been -provided, the operation will then fail). +overwrite those already known about by Git's credential subsystem. + +While it is possible to override all attributes, well behaving helpers +should refrain to do so for any attributes other than username and +password. + +If a helper outputs a `quit` attribute with a value of `true` or `1`, +no further helpers will be consulted, nor will the user be prompted +(if no credential has been provided, the operation will then fail). + +Similarly, no more helpers will be consulted once both username and +password had been provided. For a `store` or `erase` operation, the helper's output is ignored. -If it fails to perform the requested operation, it may complain to -stderr to inform the user. If it does not support the requested -operation (e.g., a read-only store), it should silently ignore the -request. + +If a helper fails to perform the requested operation or needs to notify +the user of a potential issue, it may write to stderr. + +If it does not support the requested operation (e.g., a read-only store), +it should silently ignore the request. If a helper receives any other operation, it should silently ignore the request. This leaves room for future operations to be added (older From patchwork Tue May 5 01:39:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 11528011 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0ECFA17E8 for ; Tue, 5 May 2020 01:40:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1ACC206B9 for ; Tue, 5 May 2020 01:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="upp10mKt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727871AbgEEBjs (ORCPT ); Mon, 4 May 2020 21:39:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727795AbgEEBjr (ORCPT ); Mon, 4 May 2020 21:39:47 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29DBDC061A0F for ; Mon, 4 May 2020 18:39:47 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id q124so279083pgq.13 for ; Mon, 04 May 2020 18:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7DbGokjD3txFLKPUsBfkxheLIouclb1CyZ1AqTYIaho=; b=upp10mKtJqZurfhOjAZIu4Gix+rFOqNhflC1ojcWA5qjgxnRU9fLJfM66idcOnqYdc Hxa+OglfKd2OfkFSxSeuh6FjtMBk9IL50devv+f8DNlxn86bIBzpZUJIp+x7tq+aK5K4 K7AFTKcrh9VSgjtWaPxbx2hF1YivjPPBKstCMZXkFwkrHlwUl88O/jGObWX+hxInJVuK FQ65XkiQXKO1SoYHHmG0SGcB/lzUFj/me14biH5pIOZKygx5wc15Nc1oEgX004a0zM4I n+d3iEDkNg8A2qJIjZEi/Wei6w5TM7fVcxkpszeLHJzBp9bEx24S0P2Yk/viWELPguj0 iKXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7DbGokjD3txFLKPUsBfkxheLIouclb1CyZ1AqTYIaho=; b=SjX3fhCX9opXrPsa3oHKkYsGUj1YgXIOn4o3Sy3cYlLR7qqI+v6wMqZBtgPRxAa0J3 y+msv5hJjiEtcHZCciRpEpavI8iz+tQnkOJFP0yKufAxQ2sK2tOw8er7xHIrTKFHMPlY 63e5XzCIQfvus2SpXlVGmF53vWk03Glb6HCuiaTkePRBK5z3IQPi0nyadpnSgIVsNXDS bOOvuSmeZrzilNlZpgVPt+yNfAIXvL4CZVnSrnMo3EYammNSm0rf14Z/J/WRsGfvwGI2 xlwuVW9FVgZR5g8g2iQCrPlhE+YJfsifIu5TVIYCU2+raQkctzUIbxY4ybIn6FcOL7rg Fwgw== X-Gm-Message-State: AGi0PuZ2+GgAw+zTHxLIKXlo1Ab05xhCX/e0+ofhlD63GBMFbRSX2dKk wUoxWMeK/MpXv5PgKAHZTUrzTEjC X-Google-Smtp-Source: APiQypKjFavCUAVVr9qFNX0frFy5LXdFpTJMfzm563UyArJdt2T4OhYzi1JmYR1/ojyEhda1CQUKig== X-Received: by 2002:aa7:84c5:: with SMTP id x5mr796594pfn.277.1588642786309; Mon, 04 May 2020 18:39:46 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id e196sm352027pfh.43.2020.05.04.18.39.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2020 18:39:45 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: peff@peff.net, jrnieder@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 4/4] credential: document protocol updates Date: Mon, 4 May 2020 18:39:08 -0700 Message-Id: <20200505013908.4596-5-carenas@gmail.com> X-Mailer: git-send-email 2.26.2.686.gfaf46a9ccd In-Reply-To: <20200505013908.4596-1-carenas@gmail.com> References: <20200503063423.83152-1-carenas@gmail.com> <20200505013908.4596-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Document protocol changes after CVE-2020-11008, while at it do some minor improvements for clarity and consitency. Signed-off-by: Carlo Marcelo Arenas Belón --- Documentation/git-credential.txt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt index 6f0c7ca80f..73a287e634 100644 --- a/Documentation/git-credential.txt +++ b/Documentation/git-credential.txt @@ -104,7 +104,7 @@ INPUT/OUTPUT FORMAT credential information in its standard input/output. This information can correspond either to keys for which `git credential` will obtain the login/password information (e.g. host, protocol, path), or to the -actual credential data to be obtained (login/password). +actual credential data to be obtained (username/password). The credential is split into a set of named attributes, with one attribute per line. Each attribute is @@ -123,7 +123,8 @@ Git understands the following attributes: `host`:: - The remote hostname for a network credential. + The remote hostname for a network credential. This includes + the port number if one was specified. `path`:: @@ -134,7 +135,7 @@ Git understands the following attributes: `username`:: The credential's username, if we already have one (e.g., from a - URL, from the user, or from a previously run helper). + URL, the configuration, the user, or from a previously run helper). `password`:: @@ -146,8 +147,11 @@ Git understands the following attributes: value is parsed as a URL and treated as if its constituent parts were read (e.g., `url=https://example.com` would behave as if `protocol=https` and `host=example.com` had been provided). This - can help callers avoid parsing URLs themselves. Note that any - components which are missing from the URL (e.g., there is no - username in the example above) will be set to empty; if you want - to provide a URL and override some attributes, provide the URL - attribute first, followed by any overrides. + can help callers avoid parsing URLs themselves. + + Note that specifying a protocol is mandatory and if the URL + type doesn't require a hostname (like for cert://) then an + empty ("") hostname will be generated. + + Components which are missing from the URL (e.g., there is no + username in the example above) will be left unset.