From patchwork Fri Jan 13 04:41:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13099747 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 C2EB6C54EBE for ; Fri, 13 Jan 2023 04:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232442AbjAMEmJ (ORCPT ); Thu, 12 Jan 2023 23:42:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232166AbjAMEl7 (ORCPT ); Thu, 12 Jan 2023 23:41:59 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0313AB3E for ; Thu, 12 Jan 2023 20:41:58 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id ay12-20020a05600c1e0c00b003d9ea12bafcso12568717wmb.3 for ; Thu, 12 Jan 2023 20:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=94ZdZOC93ccYfr+u+i7kJoVlJI42pQWXTJUpPUa9cvA=; b=kEo+7C+7XAJ/tsJ1QXDUufG/czW8eS5Mf/gWr5bN7kqtYIEGJIGcO5bQrrd2m/dxqc bfQeN+aSigN8JBpwTP3zzJGv1tHu3BOWOJTOCxkem+YNl4jg1YHsKZWqU1iYp/y+t98g M30OqENCH4o79oMoSr4SzVnRYo4kX6dCSLYZPuIf2FCWm/sHJjI61VuLsmJbv8DZ2Alu rCKyM2Iue9IZcMz6YHl8H1mcrHQIH7t5L0BKvfpfcUhdWvcXbZq410JkbYcCAuo0iiF5 ZLQXCWfeQ8iFqU7xS53K87p6NIYFMAwRtVcxhesIGc4V1m6AE6o8eLG6DbtI0uKE+d4W ec4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=94ZdZOC93ccYfr+u+i7kJoVlJI42pQWXTJUpPUa9cvA=; b=RZ3MekPDcuvOO2s8yShn0PCxAz1dVF7FOV26kNty/DaxryyYSCCOlVFhGSLyCMOGHL 02LST0w1uh3X2VYZY0yUbnrmVr6Rs87XBGwXdGMGYqurL4X6WstMuN+BoS640kNKuIxC 0kYn1BDdUUOMzY5duK23+qqDzoGm++uYBdvhs1FbXuwwVf+YHi9u2xwPEh2Gz/orBe4c COhNFNyDxJYeeWZk+dG6levY4dVMEY8YlhGXO0y62lGhUYcLDo6ZDz6sB7uKX8maIn4f fijB8xSUQEkR1MHjQRoLtW6gEfFAgESsEIWZD4SnToX4KKqHSwFfiyH4iTbmTlUswZRy +nog== X-Gm-Message-State: AFqh2kpdXAm4Lq2IDsvKnzBDWv8asuAd7H2VAYB8FYShmpySGT1tXRpP wDDMdf1CHW7zY8d5ser0u894JMX4r0o= X-Google-Smtp-Source: AMrXdXvQ1VseEjRn1dCqjo6QWOLz4tV+Z3QHqXCmZd909uQqcf4u8gvPrkM/UWOm9jjNzB0gvtgyeQ== X-Received: by 2002:a05:600c:5006:b0:3d2:3eda:dd1 with SMTP id n6-20020a05600c500600b003d23eda0dd1mr57623890wmr.17.1673584916389; Thu, 12 Jan 2023 20:41:56 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id h14-20020a05600c314e00b003d9fa355387sm11417410wmo.27.2023.01.12.20.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:41:56 -0800 (PST) Message-Id: <6bd92c51550c4960ee4de272d3b19451f1e337cc.1673584914.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 13 Jan 2023 04:41:51 +0000 Subject: [PATCH 1/4] ls-files: add missing documentation for --resolve-undo option Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: ZheNing Hu , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren ls-files' --resolve-undo option has existed ever since 9d9a2f4aba ("resolve-undo: basic tests", 2009-12-25), but was never documented. However, the option has been referred to in the ls-files manual itself ever since ce74de931d ("ls-files: introduce "--format" option", 2022-07-23), making its omission a bit jarring. Document this option. Signed-off-by: Elijah Newren --- Documentation/git-ls-files.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index 440043cdb8e..cb071583f8b 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -12,6 +12,7 @@ SYNOPSIS 'git ls-files' [-z] [-t] [-v] [-f] [-c|--cached] [-d|--deleted] [-o|--others] [-i|--ignored] [-s|--stage] [-u|--unmerged] [-k|--killed] [-m|--modified] + [--resolve-undo] [--directory [--no-empty-directory]] [--eol] [--deduplicate] [-x |--exclude=] @@ -77,6 +78,13 @@ OPTIONS to file/directory conflicts for checkout-index to succeed. +--resolve-undo:: + Show files having resolve-undo information in the index + together with their resolve-undo information. (resolve-undo + information is what is used to implement "git checkout -m + $PATH", i.e. to recreate merge conflicts that were + accidentally resolved) + -z:: \0 line termination on output and do not quote filenames. See OUTPUT below for more information. @@ -136,6 +144,7 @@ a space) at the start of each line: C:: modified/changed K:: to be killed ?:: other + U:: resolve-undo -- -v:: From patchwork Fri Jan 13 04:41:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13099745 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 68721C54EBD for ; Fri, 13 Jan 2023 04:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231757AbjAMEmE (ORCPT ); Thu, 12 Jan 2023 23:42:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232178AbjAMEl7 (ORCPT ); Thu, 12 Jan 2023 23:41:59 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7A1E3B902 for ; Thu, 12 Jan 2023 20:41:58 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id ay40so14516140wmb.2 for ; Thu, 12 Jan 2023 20:41:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=96Sk0OAcfjNJwx4P2tNxc+jOgawu4jEuKBlAZKgJfnU=; b=QP7QSlOpZlUbJTaKiqR72O4EmT0cZRg8Wv/onT/CzukQYlrYxZ6pvKJuWlt8ts9XYl J529zgsWjqW6sS0siGJsN0RJnly8ZhbqGajcF2iVNG3Rz3odoEzpDxjZJqZL4I557tNX zR6tvGQxjfti1D5W/gSoOmsunu9LFb0qGRpfhphyHJ97cSRBGEafCTBit6jUBOWfODcn D7HycyqXvy6KFHi4Ggem70XVFI9wG14ROgawWlc8fMrk9c9CFdoPGuIu5MlOdOH1C4ny yoYSsaf5wfy9xJhjutaDvQ0iOSvyYwj1tFDcuUNU8Rwyx5Cs0njwRoN1RRsSXB2qYxco tgRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=96Sk0OAcfjNJwx4P2tNxc+jOgawu4jEuKBlAZKgJfnU=; b=6jX+tGUglW63PVKo29cRRKy43Axm0cDAXp0kJAvwThATK4vn9g00vLWdJQU1ZkLBpR MCxIDenNlCMAPBGwuY1RDwyy0hRzUqipkbDG+hYj9C0x9xEaBCq9SUb0UW3GwQLZLGOH v5At3efD168BqQGRiXQzUVzGFzkFPTwV0d4wQc3lCn9zEjBeR5AzbJGtjtlvKulFD+N/ n8JrLTuhBPZ80D/AFt9N+YPRYbYU/eJjtEmWmvA4wFZdDwpW6eCFrxBJ2ttEp8UTAlHk Uoezawi6hYveKimJJIDTO1Nad1uSKWLrkdqHObARJFTSG/9dxmRDwnnRht7z/hkmEea7 tVPw== X-Gm-Message-State: AFqh2koQoxQsqt4lsERSR/jjabFfl0OilKvYyAYRt8WDuiS9mdJV48Br 1uirCfnSJow/TB+/UHvIVCF5+x+lw5A= X-Google-Smtp-Source: AMrXdXuVe7oymMhXEvEk2aquOrdXs5vzlgNPS+adDx1vC/FkaEl/kyR0q3g2tR69La/ZqCKTovlDBw== X-Received: by 2002:a05:600c:19cb:b0:3da:db4:6105 with SMTP id u11-20020a05600c19cb00b003da0db46105mr5906699wmq.37.1673584917170; Thu, 12 Jan 2023 20:41:57 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i8-20020a05600c354800b003cf894dbc4fsm25712140wmq.25.2023.01.12.20.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:41:56 -0800 (PST) Message-Id: <1d1330243109d499d1c07f6518265b2e163406ef.1673584914.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 13 Jan 2023 04:41:52 +0000 Subject: [PATCH 2/4] ls-files: clarify descriptions of file selection options Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: ZheNing Hu , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren The previous descriptions of the file selection options were very easy to misunderstand. For example: * "Show cached files in the output" This could be interpreted as meaning "show files which have been modified and git-add'ed, i.e. files which have cached changes relative to HEAD". * "Show deleted files" This could be interpreted as meaning "for each `git rm $FILE` we ran, show me $FILE" * "Show modified files" This could be interpreted as meaning "show files which have been modified and git-add'ed" or as "show me files that differ from HEAD" or as "show me undeleted files different from HEAD" (given that --deleted is a separate option), none of which are correct. Further, it's not very clear when some options only modify and/or override other options, as was the case with --ignored, --directory, and --unmerged (I've seen folks confused by each of them on the mailing list, sometimes even fellow git developers.) Tweak these definitions, and the one for --killed, to try to make them all a bit more clear. Finally, also clarify early on that duplicate reports for paths are often expected (both when (a) there are multiple entries for the file in the index -- i.e. when there are conflicts, and also (b) when the user specifies options that might pick the same file multiple times, such as `git ls-files --cached --deleted --modified` when there is a file with an unstaged deletion). Signed-off-by: Elijah Newren --- Documentation/git-ls-files.txt | 37 ++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index cb071583f8b..f89ab1bfc98 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -29,21 +29,26 @@ This merges the file listing in the index with the actual working directory list, and shows different combinations of the two. One or more of the options below may be used to determine the files -shown: +shown, and each file may be printed multiple times if there are +multiple entries in the index or multiple statuses are applicable for +the relevant file selection options. OPTIONS ------- -c:: --cached:: - Show cached files in the output (default) + Show all files cached in Git's index, i.e. all tracked files. + (This is the default if no -c/-s/-d/-o/-u/-k/-m/--resolve-undo + options are specified.) -d:: --deleted:: - Show deleted files in the output + Show files with an unstaged deletion -m:: --modified:: - Show modified files in the output + Show files with an unstaged modification (note that an unstaged + deletion also counts as an unstaged modification) -o:: --others:: @@ -51,11 +56,14 @@ OPTIONS -i:: --ignored:: - Show only ignored files in the output. When showing files in the - index, print only those matched by an exclude pattern. When - showing "other" files, show only those matched by an exclude - pattern. Standard ignore rules are not automatically activated, - therefore at least one of the `--exclude*` options is required. + Show only ignored files in the output. Must be used with + either an explicit '-c' or '-o'. When showing files in the + index (i.e. when used with '-c'), print only those files + matching an exclude pattern. When showing "other" files + (i.e. when used with '-o'), show only those matched by an + exclude pattern. Standard ignore rules are not automatically + activated, therefore at least one of the `--exclude*` options + is required. -s:: --stage:: @@ -64,19 +72,22 @@ OPTIONS --directory:: If a whole directory is classified as "other", show just its name (with a trailing slash) and not its whole contents. + Has no effect without -o/--others. --no-empty-directory:: Do not list empty directories. Has no effect without --directory. -u:: --unmerged:: - Show unmerged files in the output (forces --stage) + Show information about unmerged files in the output, but do + not show any other tracked files (forces --stage, overrides + --cached). -k:: --killed:: - Show files on the filesystem that need to be removed due - to file/directory conflicts for checkout-index to - succeed. + Show untracked files on the filesystem that need to be removed + due to file/directory conflicts for tracked files to be able to + be written to the filesystem. --resolve-undo:: Show files having resolve-undo information in the index From patchwork Fri Jan 13 04:41:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13099748 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 D56A0C54EBE for ; Fri, 13 Jan 2023 04:42:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbjAMEmQ (ORCPT ); Thu, 12 Jan 2023 23:42:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232226AbjAMEmA (ORCPT ); Thu, 12 Jan 2023 23:42:00 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AC8D3D1CE for ; Thu, 12 Jan 2023 20:41:59 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id f25-20020a1c6a19000000b003da221fbf48so258283wmc.1 for ; Thu, 12 Jan 2023 20:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Msu3IqdA0dkf/afSZu4Yy9Z+5SBpqZZgpX+yFxbYlk4=; b=qgxZ2Dm7cHnj0FrZcLIYT7BcEpbDFxuFtD4MSU0LxOqowquQwiDyuTa3pMEPa/dX54 MzUclgv9szYXHeLqYY+ryZU19hiWXQDCOOrjkpKmuTQiAb2S5hOPQH72ELiGqEgPD72r X4XXQ21pEh+1IqM4T6T/qMbK9jqpDBAxpIpmdu7nCZ51cXAe4qPF5w0WYK21QI/T1oP5 0madr3PAsPdsnrLOOiXPaEu9rSKedyNT2uABcdCEsiBkAdBN7kRTf/uxknIyp4TtSyyA lPxl7rtsgws4bj8TiEA4OPCthNmXlWNorZIv3GdWOvLyuLYLZZfav8Z1NuAeb3swM5Uh C0pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Msu3IqdA0dkf/afSZu4Yy9Z+5SBpqZZgpX+yFxbYlk4=; b=3gbGqFuCP8BU91qpYUTnlQz22ghLmOOsuOEVwKg7wjhBUdSnnAQIdZAf5dspeao7Wo PAlwt8kCdYTRSWfRhw9arpirgrIAwZyuzIE4e6gvpPPHFwrahvhALMWNl8dx0uaDJ/Ke qKieCtd8llJWHeiSvQO+qY0aCr8ABBhGNw6E7iQ7sgkGkQBZwx14hTnsrHbXwf1G9DYS USYQItZLsix6mQvJ8GH+TLBuaqP3vtA7cpbm4j8Wb73tVDSk6GcTFPR+95UVad/RF5uK 9Hv/WJWexmmPXHYc/n9HAjxYVIDdB++o9B2a6gzi8GCbPtWihQZgaFCWrOgYCMsBRDAl 8Jvw== X-Gm-Message-State: AFqh2kqPgHBEXajRvOJUcSDOOVipha3I1wBWLN8rsgWv9aYWJcrY+JQz ZotbfNHkn2yVFdV/WlKVHMglh5FRjfI= X-Google-Smtp-Source: AMrXdXtgY2As/mRQ0ByKzkFUSf5qkT3iCY9JNpJGYUSOO/Hv+FybAX34GzoK0PMHEM3TErGeUuwK9Q== X-Received: by 2002:a05:600c:1e09:b0:3cf:b73f:bf8f with SMTP id ay9-20020a05600c1e0900b003cfb73fbf8fmr56054836wmb.7.1673584917990; Thu, 12 Jan 2023 20:41:57 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id hg11-20020a05600c538b00b003cf6a55d8e8sm22851826wmb.7.2023.01.12.20.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:41:57 -0800 (PST) Message-Id: <26406a4d8797e68f0ba4fe097cf0973f60d67114.1673584914.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 13 Jan 2023 04:41:53 +0000 Subject: [PATCH 3/4] ls-files: clarify descriptions of status tags for -t MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: ZheNing Hu , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Much like the file selection options we tweaked in the last commit, the status tags printed with -t had descriptions that were easy to misunderstand, and for many of the same reasons. Clarify them. Also, while at it, remove the "semi-deprecated" comment for "git ls-files -t". The -t option was marked as semi-deprecated in 5bc0e247c4 ("Document ls-files -t as semi-obsolete.", 2010-07-28) because:     "git ls-files -t" is [...] badly documented, hence we point the     users to superior alternatives.     The feature is marked as "semi-obsolete" but not "scheduled for removal"     since it's a plumbing command, scripts might use it, and Git testsuite     already uses it to test the state of the index. Marking it as obsolete because it was easily misunderstood, which I think was primarily due to documentation problems, is one strategy, but I think fixing the documentation is a better option. Especially since in the intervening time, "git ls-files -t" has become heavily used by sparse-checkout users where the same confusion just doesn't apply. Signed-off-by: Elijah Newren --- Documentation/git-ls-files.txt | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index f89ab1bfc98..3886d58d178 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -137,25 +137,27 @@ OPTIONS with `-s` or `-u` options does not make any sense. -t:: - This feature is semi-deprecated. For scripting purpose, - linkgit:git-status[1] `--porcelain` and + Show status tags together with filenames. Note that for + scripting purposes, linkgit:git-status[1] `--porcelain` and linkgit:git-diff-files[1] `--name-status` are almost always superior alternatives, and users should look at linkgit:git-status[1] `--short` or linkgit:git-diff[1] `--name-status` for more user-friendly alternatives. + -- -This option identifies the file status with the following tags (followed by -a space) at the start of each line: - - H:: cached - S:: skip-worktree - M:: unmerged - R:: removed/deleted - C:: modified/changed - K:: to be killed - ?:: other - U:: resolve-undo +This option provides a reason for showing each filename, in the form +of a status tag (which is followed by a space and then the filename). +The status tags are all single characters from the following list: + + H:: tracked file that is not either unmerged or skip-worktree + S:: tracked file that is skip-worktree + M:: tracked file that is unmerged + R:: tracked file with unstaged removal/deletion + C:: tracked file with unstaged modification/change + K:: untracked paths which are part of file/directory conflicts + which prevent checking out tracked files + ?:: untracked file + U:: file with resolve-undo information -- -v:: From patchwork Fri Jan 13 04:41:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 13099749 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 009FEC54EBE for ; Fri, 13 Jan 2023 04:42:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232479AbjAMEm1 (ORCPT ); Thu, 12 Jan 2023 23:42:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbjAMEmB (ORCPT ); Thu, 12 Jan 2023 23:42:01 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 481C412AA1 for ; Thu, 12 Jan 2023 20:42:00 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id r2so19963384wrv.7 for ; Thu, 12 Jan 2023 20:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=q8bjdcU3OKYufVc+pxKzrObPJZDPds89wtEi7dgoF/k=; b=HZS5XTwLsVXTY6Dz6hl9Nj/+D8r+8AYtjxsnau8F/LZZVo/MnVoaKhuf4eczUbX2go eAef7MF3ZWPH0p7qio+ALyop6ebDQtFrqUbNskcwZz7HGt3gymDC/ZCzJ4mzkB26vtvC 7CRSLtTqNEhvhQEqGQvB6EvHMNWGC0dnspJOUUBM3bncyAMk0+2+Bjr9a7DXy/luoiN6 zjNj1w5vRGvvkq9ZSb3ggCmROAicLMnCOj2I2hB0lAU/+I2mrVt7uWOdSAR6rkL1r3+y Yn8OxMgX3JlOE6Kcm6QqPieYdI/u78txCXcUEN7mYqXEMkknuvULIitRGUpFB6hFEuGO CCYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=q8bjdcU3OKYufVc+pxKzrObPJZDPds89wtEi7dgoF/k=; b=7QbTwU7zJJ/TJALjqWx4LpEERx+SNdPUJ/1zkyx/mEEoIPfnYZ0vb1GdfOxDqG8JcI 0kmarMw1ZDiZN20TubrpG2y05A4sVbcmQ5LoeSiFnFDKjKsMn3XPiwBDrXsvM0ZcPfkI r5xvwoFSdVUaLPybSmklLFcdKIK2oZZcF6/WYHXp3O2l/MN1ww+nZrjC3fT0WtMc+KN7 8sIi7avYKYDrKHU8Mi4kWAb4xbDEVIUmWGd5W5qzyNMRSoZea3wBeVS77DK9q/krnGPA Q/rPQ4iCZ9ksQaufQ8VxXHEIMbCPwmmNMMmWV/qIu+mFYQr/V24EgIss1fhMwVwlpPDZ ekxA== X-Gm-Message-State: AFqh2kpdCKmJZcd3JpHW/b5izqcj9Bxz8cQ00zjQqDGTpWy6n0FFSIK1 /0IcS0Gg/G86D+jzMPc12EHv0+NE3f8= X-Google-Smtp-Source: AMrXdXvkzKxutgZIPOGAgFJawILjz+keaxYQfYnhENzVdO/t2EJyz4FnkhqPhhJEIFdOlIeMNcoZZA== X-Received: by 2002:adf:fe90:0:b0:2bb:a83c:efc4 with SMTP id l16-20020adffe90000000b002bba83cefc4mr15312936wrr.7.1673584918679; Thu, 12 Jan 2023 20:41:58 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id k9-20020a5d6d49000000b002bc8130cca7sm9771933wri.23.2023.01.12.20.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:41:58 -0800 (PST) Message-Id: In-Reply-To: References: Date: Fri, 13 Jan 2023 04:41:54 +0000 Subject: [PATCH 4/4] ls-files: guide folks to --exclude-standard over other --exclude* options Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: ZheNing Hu , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Signed-off-by: Elijah Newren --- Documentation/git-ls-files.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index 3886d58d178..1abdd3c21c5 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -119,7 +119,8 @@ OPTIONS --exclude-per-directory=:: Read additional exclude patterns that apply only to the - directory and its subdirectories in . + directory and its subdirectories in . Deprecated; use + --exclude-standard instead. --exclude-standard:: Add the standard Git exclusions: .git/info/exclude, .gitignore @@ -291,7 +292,9 @@ traversing the directory tree and finding files to show when the flags --others or --ignored are specified. linkgit:gitignore[5] specifies the format of exclude patterns. -These exclude patterns come from these places, in order: +Generally, you should just use --exclude-standard, but for historical +reasons the exclude patterns can be specified from the following +places, in order: 1. The command-line flag --exclude= specifies a single pattern. Patterns are ordered in the same order