From patchwork Mon May 22 19:28:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 13250985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD2DDC7EE2A for ; Mon, 22 May 2023 19:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234703AbjEVT3P (ORCPT ); Mon, 22 May 2023 15:29:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234697AbjEVT3M (ORCPT ); Mon, 22 May 2023 15:29:12 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F43186 for ; Mon, 22 May 2023 12:29:06 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3094871953bso3352395f8f.0 for ; Mon, 22 May 2023 12:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684783744; x=1687375744; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=baRKp++XNGqFLZImIKBUEPkFSQEx4N2m9iIFFysV+mU=; b=E03xrW98DAm3Rm0FHBStw4TymNFezocWgA3HSfEuF4xR8Iot4BpM7XWYtbDANApD0g 101Oq3kmQfRroT4K8p37q3H5x4m3ScMc5o4Bw+yIsXyc2Qm0BbXRpO9xWUSe+22a9E+V RUEDT2R8rAH306fh8rJL0mStpTVSxxi4I6Cqqek6ZbWUlHHuQFUdI5s15KE0/h48Wtac 6uCnuAsUTrrtfsNnhjfEGlMZ4c5U6IGde4GkeT077fyzwv4BCWhJgpU9tS+Q6Zbj0U9D QJBfACkGLCeDwelLO3MdwIDJL5rNNUgo0bezZekw3Yc55/9r/pgzUONzdeuN5TYcHPn3 zpqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684783744; x=1687375744; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=baRKp++XNGqFLZImIKBUEPkFSQEx4N2m9iIFFysV+mU=; b=HqWL+wDt081ZOTwTQBDjx57rrVEQE8L035r7gB5ZpH+3jfY/cHaO6L0J8sIJqnIa/x ur61DEik4Fu0QhEjfK1T+35ZRAPROkJCkunxnvOe6XAUhxELiSizU1gRNYUWcc2EOBcf 2jX9SXX5cT5CqwAvzmd0dogetubYomBgGzGakgp366FFMygCDmIrUhrua1NP134DuyVc WaNs3C6B27/nX2QcYmKbaYNnMKjaeKOcSGVa5W02Fq6MR60haRBbgvJYf7CuXodyXxOF yhMgWSY8YpsMRi3pCOM7TqYBxWhyF2utWsDcWSKZEaYm/7ilSVBhHLg5/UsdTrT8cad0 B5PQ== X-Gm-Message-State: AC+VfDw3tr7QlnIc5DZkL6RoGHlP7goKftyNQU9IupS9lyxwQW51d5Bo iJ+PMHBOjHaN9FsacrdipyTxNs5/63k= X-Google-Smtp-Source: ACHHUZ7XNvi3i78A6+D03vPemDezxDx1ZKDXWZoNFVbyXC0YaKdG4UvO3Mcwkyrgb8D05Hv3iLJsZw== X-Received: by 2002:adf:f342:0:b0:306:30ea:a072 with SMTP id e2-20020adff342000000b0030630eaa072mr7519266wrp.53.1684783744226; Mon, 22 May 2023 12:29:04 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o10-20020a5d670a000000b0030903371ef9sm8718249wru.22.2023.05.22.12.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 12:29:03 -0700 (PDT) Message-Id: <1bacd52a432ecb89bc41b49a9e6317f8a5b15171.1684783741.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 22 May 2023 19:28:56 +0000 Subject: [PATCH v2 1/6] revisions.txt: use description list for special refs Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Johannes Schindelin , Victoria Dye , Taylor Blau , Eric Sunshine , Felipe Contreras , Philippe Blain , Chris Torek , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain From: Philippe Blain The special refs listed in 'gitrevisions' (under the '' entry) are on separate lines in the Asciidoc source, but end up as a single continuous paragraph in the rendered documentation (see e.g. [1]). In following commits we will mention additional special refs, so to improve legibility, use a description list such that every entry appears on its own line. Since we are already in a description list, use ':::' as the term delimiter. In order for the new description list to be aligned with the description under the '' entry, instead of being aligned with the last entry of the "in the following rules" nested list, use the "ancestor list continuation" syntax [2], i.e., leave an empty line before the continuation '+'. Do the same for the paragraph following the new description list ("Note that any..."). While at it, also use a continuation '+' before the "in the following rules" list, for correctness. The parser seems not to care here, but it's best to keep the sources correct. [1] https://git-scm.com/docs/gitrevisions#Documentation/gitrevisions.txt-emltrefnamegtemegemmasterememheadsmasterememrefsheadsmasterem [2] https://docs.asciidoctor.org/asciidoc/latest/lists/continuation/#ancestor-list-continuation Suggested-by: Victoria Dye Based-on-patch-by: Taylor Blau Signed-off-by: Philippe Blain --- Documentation/revisions.txt | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index 9aa58052bc7..ab5b8cf880b 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -30,7 +30,7 @@ characters and to avoid word splitting. explicitly say 'heads/master' to tell Git which one you mean. When ambiguous, a '' is disambiguated by taking the first match in the following rules: - ++ . If '$GIT_DIR/' exists, that is what you mean (this is usually useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD` and `CHERRY_PICK_HEAD`); @@ -44,19 +44,25 @@ characters and to avoid word splitting. . otherwise, 'refs/remotes/' if it exists; . otherwise, 'refs/remotes//HEAD' if it exists. + + -`HEAD` names the commit on which you based the changes in the working tree. -`FETCH_HEAD` records the branch which you fetched from a remote repository -with your last `git fetch` invocation. -`ORIG_HEAD` is created by commands that move your `HEAD` in a drastic -way (`git am`, `git merge`, `git rebase`, `git reset`), -to record the position of the `HEAD` before their operation, so that -you can easily change the tip of the branch back to the state before you ran -them. -`MERGE_HEAD` records the commit(s) which you are merging into your branch -when you run `git merge`. -`CHERRY_PICK_HEAD` records the commit which you are cherry-picking -when you run `git cherry-pick`. + `HEAD`::: + names the commit on which you based the changes in the working tree. + `FETCH_HEAD`::: + records the branch which you fetched from a remote repository with + your last `git fetch` invocation. + `ORIG_HEAD`::: + is created by commands that move your `HEAD` in a drastic way (`git + am`, `git merge`, `git rebase`, `git reset`), to record the position + of the `HEAD` before their operation, so that you can easily change + the tip of the branch back to the state before you ran them. + `MERGE_HEAD`::: + records the commit(s) which you are merging into your branch when you + run `git merge`. + `CHERRY_PICK_HEAD`::: + records the commit which you are cherry-picking when you run `git + cherry-pick`. + + Note that any of the 'refs/*' cases above may come either from the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file. From patchwork Mon May 22 19:28:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 13250986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD723C77B73 for ; Mon, 22 May 2023 19:29:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234709AbjEVT3R (ORCPT ); Mon, 22 May 2023 15:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234706AbjEVT3O (ORCPT ); Mon, 22 May 2023 15:29:14 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A20C1189 for ; Mon, 22 May 2023 12:29:06 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f6042d605dso11913765e9.2 for ; Mon, 22 May 2023 12:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684783745; x=1687375745; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=zv5GVNJqU+6rxTRqJ9TojswlL7JqWqUrtTAfC1RIvWM=; b=EC86Ek1VxoazXWCALkKhyJSXFuziJzScAfgBQuyRi2GrgLVWtgfreYDcPrgTuouuzK 5tSA0RafaUL+CHZzbwKDIxUz0CjRBRMeG6ecWkxEppiNV4QvllsmmQUvoez0CWLwAGgS iZSVYgve/xl38fHDYNGpwkS+9vopBqBYluuN9egoI5ogV9g0ft83Ae52DsXqQTd9Mqb+ AsAvZVa7yXPSQFxHIL/zHxicKZf9oWXXfE0XYFOu7s6q3NI2lcLNPBchVpB7So2X4VMr HYple2o1b81A2gZeIxMpg4AymBW9GVscXQtyy5Uj+YtLWr3WtoiUE/tVaoOMfKOrfNo0 JH7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684783745; x=1687375745; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zv5GVNJqU+6rxTRqJ9TojswlL7JqWqUrtTAfC1RIvWM=; b=Jqz3lwszVpM33KI9Z/7VfTihASe53ddmm3ueK9buchVuxI+6qJgt5p2q88unMln+ph Pf/ka5o9CAH9bVH+YrR19rbhZKfgCNXwWb9mR4AqPSJjdYDpqMHT6YN68dp08AwExIKD gv0fsCfDcDyHOY2uVU58/ddd1xyB3gl+nQJgj0ikDG9j/OpDn2Rt9W5e1S2z2J9uJvB9 XpOlxyhS8GPGFb/f7g9UBnPZ/D9BRF2cgit4CnnDKPu37ZITqg0KgWGb4pLp4q19cQhu ncg4pwrsqLjKwO/5/FvynI3tCemVkz39E0atVECugZzka+KRLncLvsbmt07jINVoMX1z seXQ== X-Gm-Message-State: AC+VfDxJSUr+fqIAm8YGkPe2FwDIEGjEPreIGfH+DM4g41M+mMq1H03N Rzj3gu1mmPzwCYjlG4gusjVMpDc2F90= X-Google-Smtp-Source: ACHHUZ6oODQVROEdzjj8nZY6WT7d0BN1iHsOjTtCD1RzfcFu7JU+JSbc2qqiCIWHwMHBJhWYtHOh+Q== X-Received: by 2002:a05:600c:2216:b0:3f6:41f:5a68 with SMTP id z22-20020a05600c221600b003f6041f5a68mr3379245wml.29.1684783744732; Mon, 22 May 2023 12:29:04 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f12-20020a5d58ec000000b00309257ad16csm8674183wrd.29.2023.05.22.12.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 12:29:04 -0700 (PDT) Message-Id: <3e3240a78f81d7886fa47bc26b859a4d7d238aff.1684783741.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 22 May 2023 19:28:57 +0000 Subject: [PATCH v2 2/6] revisions.txt: document more special refs Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Johannes Schindelin , Victoria Dye , Taylor Blau , Eric Sunshine , Felipe Contreras , Philippe Blain , Chris Torek , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain From: Philippe Blain Some special refs, namely HEAD, FETCH_HEAD, ORIG_HEAD, MERGE_HEAD and CHERRY_PICK_HEAD, are mentioned and described in 'gitrevisions', but some others, namely REBASE_HEAD, REVERT_HEAD, and BISECT_HEAD, are not. Add a small description of these special refs. Signed-off-by: Philippe Blain --- Documentation/revisions.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index ab5b8cf880b..b34f981622b 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -32,8 +32,8 @@ characters and to avoid word splitting. first match in the following rules: + . If '$GIT_DIR/' exists, that is what you mean (this is usually - useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD` - and `CHERRY_PICK_HEAD`); + useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD`, + `REBASE_HEAD`, `REVERT_HEAD`, `CHERRY_PICK_HEAD` and `BISECT_HEAD`); . otherwise, 'refs/' if it exists; @@ -59,9 +59,18 @@ characters and to avoid word splitting. `MERGE_HEAD`::: records the commit(s) which you are merging into your branch when you run `git merge`. + `REBASE_HEAD`::: + during a rebase, records the commit at which the operation is + currently stopped, either because of conflicts or an `edit` command in + an interactive rebase. + `REVERT_HEAD`::: + records the commit which you are reverting when you run `git revert`. `CHERRY_PICK_HEAD`::: records the commit which you are cherry-picking when you run `git cherry-pick`. + `BISECT_HEAD`::: + records the current commit to be tested when you run `git bisect + --no-checkout`. + Note that any of the 'refs/*' cases above may come either from From patchwork Mon May 22 19:28:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 13250988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BD9BC77B73 for ; Mon, 22 May 2023 19:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234716AbjEVT3U (ORCPT ); Mon, 22 May 2023 15:29:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234707AbjEVT3Q (ORCPT ); Mon, 22 May 2023 15:29:16 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16559118 for ; Mon, 22 May 2023 12:29:08 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-307d20548adso4155207f8f.0 for ; Mon, 22 May 2023 12:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684783746; x=1687375746; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=OXZgtomDUzZgqaysrY3KHewgOZIRwk9evIrjx/Ge6ec=; b=RgrWfsd+tE5HHGkuQ8Dx8tAD0l8lyFnM0Bro02qsEOGPFwh0CJplfCjvNyrtw3/88b Ye5uXxeezvBcOF1AsNGCFhwY8ezxE9DDH4AUrWyUpCn11Vw4dzHq387b0XhYwE9Zkef1 HSV2rYmiwsSn2l3Uote+HfNKLMTSLmbr6m0n+58mj7UIoRITIbIDbHFJC0XW7jBZ0vQV LMK3o6GbxXi5ez5bMEEpnCofbMir5fXuy0Zr6Qr+ShhhPFF7p7OnRAh+Q/1GQva1w2aC 43RgDNoBp7vFGlaYLsgkm6vTychCkFi7GyuqfK1UEDgzAECXXhUbYLhrcwTgeUcl+bnI bJJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684783746; x=1687375746; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OXZgtomDUzZgqaysrY3KHewgOZIRwk9evIrjx/Ge6ec=; b=BIzHnEiO/lmU6VpY/Zml9TdBYEIpi7JihmaabkBdSCyK3jVIUp6OcBGbB8rR5goUbP IJd9vJDSPgYMsyvA7VXQRq6717do54X6aEZJeqhzngXBB6brSm1qhYJgHHKJyNY2ruXP 6tIBd+gYaV1mf+cHHXutjHqqIYxWGBcEn5zsU1kxqklYyoguXZY+C1JRHRDuSw2K/l6f ToOW3dWU8NM/GoHZwidNp+kfqyNeiOWdMbs0Rr/Ch7xtVvjGsidj8Nrue+9Wou3OlWur 0VrjxGspS27fTOms7WcjFSHi4XGAzoWNFiUXat5GuI8S2vfyPHHwBN0/WW6x3LUe7+8Q MmrQ== X-Gm-Message-State: AC+VfDztHuGVNncvFyiOB0z/b8geCl1WJLWnpIp6eDncr6JrkYMaP/4u 1AhqwzELbdgAk5c45eM9SmZ+fXSTKIE= X-Google-Smtp-Source: ACHHUZ5bPo0v1vr92gG31K2wqNxCWfwLBa3PsiEVPfxsVB4LVa+Pd0R+pu75amitwPp9Rees8tQVKg== X-Received: by 2002:adf:fa09:0:b0:309:4e64:7a28 with SMTP id m9-20020adffa09000000b003094e647a28mr7747351wrr.49.1684783745563; Mon, 22 May 2023 12:29:05 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c10-20020a5d414a000000b00304ae802f02sm8633605wrq.66.2023.05.22.12.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 12:29:05 -0700 (PDT) Message-Id: <70487d664591f1a201ce5711b16521873f80dbee.1684783741.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 22 May 2023 19:28:58 +0000 Subject: [PATCH v2 3/6] completion: complete REVERT_HEAD and BISECT_HEAD Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Johannes Schindelin , Victoria Dye , Taylor Blau , Eric Sunshine , Felipe Contreras , Philippe Blain , Chris Torek , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain From: Philippe Blain The pseudorefs REVERT_HEAD and BISECT_HEAD are not suggested by the __git_refs function. Add them there. Signed-off-by: Philippe Blain --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index dc95c34cc85..bcda376735c 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -767,7 +767,7 @@ __git_refs () track="" ;; *) - for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do + for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD REVERT_HEAD BISECT_HEAD; do case "$i" in $match*|$umatch*) if [ -e "$dir/$i" ]; then From patchwork Mon May 22 19:28:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 13250987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 945C2C77B75 for ; Mon, 22 May 2023 19:29:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234714AbjEVT3T (ORCPT ); Mon, 22 May 2023 15:29:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234696AbjEVT3O (ORCPT ); Mon, 22 May 2023 15:29:14 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0AFDE9 for ; Mon, 22 May 2023 12:29:07 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f509ec3196so26718785e9.1 for ; Mon, 22 May 2023 12:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684783746; x=1687375746; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=CI/bwwWHE7EmTgiA+iHmWMTWSAt0ih39DRjqY+kKGaE=; b=kE0p+b1Q5IFej5QzGt1QB2A+VE0LxYA+GZkyaMYq6i5FfLk3Uiq4ZKwCCQfBtoa5As +dUlevh71ghLea0DTCdt4cinRK6ih1s2RNc2buz0ITTTi9d6KkS2RA7iTHYcBMgmhMFk 6Nvy+x21XFiQaCwnnqmIYqCc0NxhDPRyM45a5pJ7uE0NffOn3EOAu/cb5ubjwfWOPiWG iZ0GE3jR5Qw8yykK/CfCTewvX/i0K3cCpqOCZRdffkbjnMwMyE6wYI9FXlK3axYBwxWb OYhuSWGXcqovfWzjAaCqhDgAcn/3D5oFYzN8G1oQMjE6Zl+maVgAtmT+kazGZbsd3P+k wxJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684783746; x=1687375746; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CI/bwwWHE7EmTgiA+iHmWMTWSAt0ih39DRjqY+kKGaE=; b=gGnxF7/aeusS0pXPmAI917ELIK0qH9Xi6Nllrg4nZzq9w3vEy1TBg6kiZU0KOdP+sC CFdeJAgGVMJCM5ni363FtbfeEuQclTC5M1hOlNTZsNjqULyH+GJYDrvqRTB+4aZidnlg VkLEt4AHE1TMht1wiRBZpQsbWuWL4uAreosO1RIa0PPCGuPq/SnAgiBH2M7aKrzt91cD oLswMrwbR4MpwgGLXLN7XSuWzeyLn1VJX7ZhE2LgcM7Adx5bBlqw5ZJgfzziRVyxmgB5 eAxmlWbQwBZl4bHddWCu6wd1f/eex+08eQ+KjKd6YR8kgqHSH4yTQIrpI/oCMBmuRIkw rI0w== X-Gm-Message-State: AC+VfDw+nYbxtW5pH7C0AcdkFIRWUmFEi2gqjSy/luSNnZ18rAXWVMzX V/7IAWYg22Mn0TZvID/VTZZzxjU6JdU= X-Google-Smtp-Source: ACHHUZ4ms0VNZ3MRizdUoPcJwacW5aPyThqScmJtizQ/XSGCA/I/Of8KkdTUTwHb5GvyRi6E8o2pKQ== X-Received: by 2002:adf:dc8b:0:b0:303:daff:f1a3 with SMTP id r11-20020adfdc8b000000b00303dafff1a3mr9833570wrj.1.1684783746112; Mon, 22 May 2023 12:29:06 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id s9-20020a7bc389000000b003f60514bdd7sm3660418wmj.4.2023.05.22.12.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 12:29:05 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Mon, 22 May 2023 19:28:59 +0000 Subject: [PATCH v2 4/6] git-merge.txt: modernize word choice in "True merge" section Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Johannes Schindelin , Victoria Dye , Taylor Blau , Eric Sunshine , Felipe Contreras , Philippe Blain , Chris Torek , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain From: Philippe Blain The "True merge" section of the 'git merge' documentation mentions that in case of conflicts, the conflicted working tree files contain "the result of the "merge" program". This probably refers to RCS's 'merge' program, which is mentioned further down under "How conflicts are presented". Since it is not clear at that point of the document which program is referred to, and since most modern readers probably do not relate to RCS anyway, let's just write "the merge operation" instead. Signed-off-by: Philippe Blain --- Documentation/git-merge.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 0aeff572a59..23aefe28851 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -194,7 +194,7 @@ happens: versions: stage 1 stores the version from the common ancestor, stage 2 from `HEAD`, and stage 3 from `MERGE_HEAD` (you can inspect the stages with `git ls-files -u`). The working - tree files contain the result of the "merge" program; i.e. 3-way + tree files contain the result of the merge operation; i.e. 3-way merge results with familiar conflict markers `<<<` `===` `>>>`. 5. No other changes are made. In particular, the local modifications you had before you started merge will stay the From patchwork Mon May 22 19:29:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 13250989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CEEDC77B73 for ; Mon, 22 May 2023 19:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234726AbjEVT3Z (ORCPT ); Mon, 22 May 2023 15:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234708AbjEVT3R (ORCPT ); Mon, 22 May 2023 15:29:17 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E35BB10D for ; Mon, 22 May 2023 12:29:08 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-30a4ebbda56so2455256f8f.1 for ; Mon, 22 May 2023 12:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684783747; x=1687375747; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=gRYu6sa6qX4ZyARK1E1Kut2WWE6vTZxSQYw6xEPg/Kw=; b=ly8Y0qh256C7HPa8AXPHQNauGQMiAVa5fDc0uHXUdt6PViZ7X6i/4Ywfob87B4pZf/ QGVMj3b8heyyny0CYwyOtpSuG6gBgbZxdvDob7WOwPdW6BzukPShZ93jGs04bDdRYjhw sKY6NzEkoJzDmslUEMfgHz6NKunuOmC557jqX2ngK3DEsjDG2dQC0RWx4B/7rLBqoTK6 gd2rqFXOtnx/VfFV0whU5ZPLuvO9tAQo3Z5sYcSeH5795thJleDG3GMNCWRmpN0VxfHJ JYaQQAPhUCcd8M6q35Ne5e62Yt/w6v6xO0UizP6cF1LDAvvFvqC5N7Zgp7wV/MJrQgK4 7J1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684783747; x=1687375747; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gRYu6sa6qX4ZyARK1E1Kut2WWE6vTZxSQYw6xEPg/Kw=; b=aHCOsw+CqVuCVsOOILNyouFOfHWFQxReRXKMGdV5JwAEjGx/ReszZ2E6aHaDq24dED MBom89/dqCK7EJTMs4AlORG4TJCMaGM4C7h4NVDAmRlzm4ES8rvLnNkLbIXmIA2vsUOJ iclPtFHqa7MZeXDSTCckjcp5OEsovCplpVgdqK6DXC952+TZrOlaoUlU5llpj3EptJXV hXTAGTdUoKnW1axd6pCj5L89Y1v0/4oF/40n89WQ1UZ0vTDwbHL57z/aKUqdV4Y/Bl0R N0FkzIWLNCLbktBuaDq1JFU1jK2x7GxfPy/+1/zVZppCCNIl0JdHza8Guyu7qy6C/GCq d7dg== X-Gm-Message-State: AC+VfDzk5mxGES0RbvbD1oAy8Rcoc0iSrFRnrzGaxHnHkLlRHIW7O5u7 cM/1ZR8OFAqlge3Oo1DKQMXuwleL6UU= X-Google-Smtp-Source: ACHHUZ4dIiaKe9uZ0NRs7kiC5Uop3JpQcjanZM4Gz+dg4TI8ONofKI78s+if3dHsA7ZjNmfryh4Spg== X-Received: by 2002:adf:dc43:0:b0:309:5029:b075 with SMTP id m3-20020adfdc43000000b003095029b075mr8465671wrj.13.1684783747058; Mon, 22 May 2023 12:29:07 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c14-20020a056000104e00b00307b5376b2csm8580448wrx.90.2023.05.22.12.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 12:29:06 -0700 (PDT) Message-Id: <612073d9508223408100f7c8b9c514012144205f.1684783741.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 22 May 2023 19:29:00 +0000 Subject: [PATCH v2 5/6] Documentation: document AUTO_MERGE Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Johannes Schindelin , Victoria Dye , Taylor Blau , Eric Sunshine , Felipe Contreras , Philippe Blain , Chris Torek , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain From: Philippe Blain Since 5291828df8 (merge-ort: write $GIT_DIR/AUTO_MERGE whenever we hit a conflict, 2021-03-20), when using the 'ort' merge strategy, the special ref AUTO_MERGE is written when a merge operation results in conflicts. This ref points to a tree recording the conflicted state of the working tree and is very useful during conflict resolution. However, this ref is not documented. Add some documentation for AUTO_MERGE in git-diff(1), git-merge(1), gitrevisions(7) and in the user manual. In git-diff(1), mention it at the end of the description section, when we mention that the command also accepts trees instead of commits, and also add an invocation to the "Various ways to check your working tree" example. In git-merge(1), add a step to the list of things that happen "when it is not obvious how to reconcile the changes", under the "True merge" section. Also mention AUTO_MERGE in the "How to resolve conflicts" section, when mentioning 'git diff'. In gitrevisions(7), add a mention of AUTO_MERGE along with the other special refs. In the user manual, add a paragraph describing AUTO_MERGE to the "Getting conflict-resolution help during a merge" section, and include an example of a 'git diff AUTO_MERGE' invocation for the example conflict used in that section. Note that for uniformity we do not use backticks around AUTO_MERGE here since the rest of the document does not typeset special refs differently. Closes: https://github.com/gitgitgadget/git/issues/1471 Signed-off-by: Philippe Blain --- Documentation/git-diff.txt | 9 ++++++++- Documentation/git-merge.txt | 9 +++++++-- Documentation/revisions.txt | 7 ++++++- Documentation/user-manual.txt | 27 +++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 52b679256c4..08087ffad5f 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -102,7 +102,11 @@ If --merge-base is given, use the merge base of the two commits for the Just in case you are doing something exotic, it should be noted that all of the in the above description, except in the `--merge-base` case and in the last two forms that use `..` -notations, can be any . +notations, can be any . A tree of interest is the one pointed to +by the special ref `AUTO_MERGE`, which is written by the 'ort' merge +strategy upon hitting merge conflicts (see linkgit:git-merge[1]). +Comparing the working tree with `AUTO_MERGE` shows changes you've made +so far to resolve textual conflicts (see the examples below). For a more complete list of ways to spell , see "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. @@ -152,6 +156,7 @@ Various ways to check your working tree:: $ git diff <1> $ git diff --cached <2> $ git diff HEAD <3> +$ git diff AUTO_MERGE <4> ------------ + <1> Changes in the working tree not yet staged for the next commit. @@ -159,6 +164,8 @@ $ git diff HEAD <3> would be committing if you run `git commit` without `-a` option. <3> Changes in the working tree since your last commit; what you would be committing if you run `git commit -a` +<4> Changes in the working tree you've made to resolve textual + conflicts so far. Comparing with arbitrary commits:: + diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 23aefe28851..8625c5cb0ec 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -196,7 +196,11 @@ happens: can inspect the stages with `git ls-files -u`). The working tree files contain the result of the merge operation; i.e. 3-way merge results with familiar conflict markers `<<<` `===` `>>>`. -5. No other changes are made. In particular, the local +5. A special ref `AUTO_MERGE` is written, pointing to a tree + corresponding to the current content of the working tree (including + conflict markers for textual conflicts). Note that this ref is only + written when the 'ort' merge strategy is used (the default). +6. No other changes are made. In particular, the local modifications you had before you started merge will stay the same and the index entries for them stay as they were, i.e. matching `HEAD`. @@ -336,7 +340,8 @@ You can work through the conflict with a number of tools: * Look at the diffs. `git diff` will show a three-way diff, highlighting changes from both the `HEAD` and `MERGE_HEAD` - versions. + versions. `git diff AUTO_MERGE` will show what changes you've + made so far to resolve textual conflicts. * Look at the diffs from each branch. `git log --merge -p ` will show diffs first for the `HEAD` version and then the diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index b34f981622b..6ea6c7cead1 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -33,7 +33,8 @@ characters and to avoid word splitting. + . If '$GIT_DIR/' exists, that is what you mean (this is usually useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD`, - `REBASE_HEAD`, `REVERT_HEAD`, `CHERRY_PICK_HEAD` and `BISECT_HEAD`); + `REBASE_HEAD`, `REVERT_HEAD`, `CHERRY_PICK_HEAD`, `BISECT_HEAD` + and `AUTO_MERGE`); . otherwise, 'refs/' if it exists; @@ -71,6 +72,10 @@ characters and to avoid word splitting. `BISECT_HEAD`::: records the current commit to be tested when you run `git bisect --no-checkout`. + `AUTO_MERGE`::: + records a tree object corresponding to the state the + 'ort' merge strategy wrote to the working tree when a merge operation + resulted in conflicts. + Note that any of the 'refs/*' cases above may come either from diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index dc9c6a663a9..aa385137adc 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1343,6 +1343,33 @@ $ git diff -3 file.txt # diff against stage 3 $ git diff --theirs file.txt # same as the above. ------------------------------------------------- +When using the 'ort' merge strategy (the default), before updating the working +tree with the result of the merge, Git writes a special ref named AUTO_MERGE +reflecting the state of the tree it is about to write. Conflicted paths with +textual conflicts that could not be automatically merged are written to this +tree with conflict markers, just as in the working tree. AUTO_MERGE can thus be +used with linkgit:git-diff[1] to show the changes you've made so far to resolve +conflicts. Using the same example as above, after resolving the conflict we +get: + +------------------------------------------------- +$ git diff AUTO_MERGE +diff --git a/file.txt b/file.txt +index cd10406..8bf5ae7 100644 +--- a/file.txt ++++ b/file.txt +@@ -1,5 +1 @@ +-<<<<<<< HEAD:file.txt +-Hello world +-======= +-Goodbye +->>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt ++Goodbye world +------------------------------------------------- + +Notice that the diff shows we deleted the conflict markers and both versions of +the content line, and wrote "Goodbye world" instead. + The linkgit:git-log[1] and linkgit:gitk[1] commands also provide special help for merges: From patchwork Mon May 22 19:29:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 13250990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ECE7C77B75 for ; Mon, 22 May 2023 19:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234734AbjEVT31 (ORCPT ); Mon, 22 May 2023 15:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234711AbjEVT3S (ORCPT ); Mon, 22 May 2023 15:29:18 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A3C611A for ; Mon, 22 May 2023 12:29:09 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-309438004a6so4064631f8f.2 for ; Mon, 22 May 2023 12:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684783748; x=1687375748; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=dL8RywK3IbRfheNuCT7+B/rpq26oTVcacZsRBOSlJMo=; b=GI49mn+jvA95mb1g6lXbGeDEJgm4u2sH6R4V6LWSmk9aBeiwod1EVbowKepR1tKqNv Rn1oBz9im0tyddQkZz5fH57ov7o41/MeKFBlLVqizz2ARd0eYb+PvrGHd8PaK2wL3LcS lBgIcnMDfQfWe0v2/oczEuMvJJ+NOvixhuWYZDIfRco3Ys8/7AZtfanlQMDxyts7KPcl ttq/2ccoV4VGyaUQfzN/Vn53UzrX61mCGWeKcR/XqTq+9PTHQiyfkd6wMihv1OwGi6or yMdCnX8RYtkc2C3GIjcX725SA02g+KFClQAbKBuRga/yJqM9XSHr7V8Agdfqf586xM+k l6+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684783748; x=1687375748; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dL8RywK3IbRfheNuCT7+B/rpq26oTVcacZsRBOSlJMo=; b=RFaWw2CoPr+uy+tJ5VpCPKAvbF8aWUzpJNI9/9+aoLZWivkORoD018h8hCv73QK+5e orZ5cP7tt5+TgRcfUbyJIO7F172XTFX0hQ6/K54gXo3S8Xxt7hhSqMXILAxecCbn06nU VtwzGwEdauBhuSDpfEN7ZUklUPxRitG3kQD+QP8HPJ7C2Gpub2S+7aMF8zYpscVkT6uC HbfZb0SdUSwkts3SOuRG17LQ5QRB9LTU3TKLUmgLxE83899uTouGocPz29qBD47/ZQeX ziUsZ8DlOBzWJlYQajPHGL+s5XLNvlYSsLjZLCTvyq7Z+4RUDdd4BpvrXXV8M7qWCvpg iIWQ== X-Gm-Message-State: AC+VfDzX0nmoabqTc40M/NVI+9UWH1dldQopAsrPt8TVomyJ1WKFQYjB qXrp7/plEx2j4QWDmN3ZzCRcbToMhFA= X-Google-Smtp-Source: ACHHUZ629SnzQbxZfUDUdl+sbsx3IvlXE5C3zCkqpcrRE9Flm1tJA04SFHoYcFdQGrq6nEfg+q3T0A== X-Received: by 2002:adf:ee8b:0:b0:309:32e5:b47a with SMTP id b11-20020adfee8b000000b0030932e5b47amr9285609wro.63.1684783747801; Mon, 22 May 2023 12:29:07 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id b10-20020adfde0a000000b003021288a56dsm8717750wrm.115.2023.05.22.12.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 12:29:07 -0700 (PDT) Message-Id: <17226c56e7b8927c423d31ca2fa4c74859e65f86.1684783741.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 22 May 2023 19:29:01 +0000 Subject: [PATCH v2 6/6] completion: complete AUTO_MERGE Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Johannes Schindelin , Victoria Dye , Taylor Blau , Eric Sunshine , Felipe Contreras , Philippe Blain , Chris Torek , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain From: Philippe Blain The pseudoref AUTO_MERGE is documented since the previous commit. To make it easier to use, let __git_refs in the Bash completion code complete it. Signed-off-by: Philippe Blain --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bcda376735c..945d2543b07 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -767,7 +767,7 @@ __git_refs () track="" ;; *) - for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD REVERT_HEAD BISECT_HEAD; do + for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD REVERT_HEAD BISECT_HEAD AUTO_MERGE; do case "$i" in $match*|$umatch*) if [ -e "$dir/$i" ]; then