git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Johannes Altmanninger <aclopte@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] Documentation/diff-format: state in which cases porcelain status is T
Date: Sat, 2 Oct 2021 16:35:43 -0700	[thread overview]
Message-ID: <CABPp-BFyNamEVkEZsEhY9w3yCHg4uU-hkuHjvzj-BoGtvDBFZg@mail.gmail.com> (raw)
In-Reply-To: <20211002213046.725892-1-aclopte@gmail.com>

On Sat, Oct 2, 2021 at 2:38 PM Johannes Altmanninger <aclopte@gmail.com> wrote:
>
> Porcelain status letter T is documented as "type of the file", which
> is technically correct but not enough information for users that are
> not so familiar with this term from systems programming. In particular,
> given that the only supported file types are regular files and symbolic
> links,

and submodules (though users aren't likely to think of that as a "file" type)

> the term "file type" is surely opaque to the many(?) users who
> are not aware that symbolic links can be tracked - I thought that a
> "chmod +x" would result in a T status (wrong, it's M).

Heh, I've probably made that mistake before...and I was actually
thinking of exactly that case while reading this commit message.  Just
goes to show that I'm prone to repeat my mistakes.  Anyway, I'm glad
you discussed the executable bit case in the commit message.

> Explicitly document the three file types (including submodules).
> This makes life easier for tool authors, but has potential to go
> out of date if a new type is ever added. We could avoid this with a
> targeted test, or by using a reStructuredText directive to include the
> list of file types from a single source.  Probably not worth it. The
> next patch will copy this snippet to git-status.txt though.
>
> Signed-off-by: Johannes Altmanninger <aclopte@gmail.com>
> ---
>
> (The implementation calls the third type "gitlink" but for users that's
> always a submodule, AFAICT)
>
>  Documentation/diff-format.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
> index fbbd410a84..7a9c3b6ff4 100644
> --- a/Documentation/diff-format.txt
> +++ b/Documentation/diff-format.txt
> @@ -59,7 +59,7 @@ Possible status letters are:
>  - D: deletion of a file
>  - M: modification of the contents or mode of a file
>  - R: renaming of a file
> -- T: change in the type of the file
> +- T: change in the type of the file (regular file, symbolic link or submodule)
>  - U: file is unmerged (you must complete the merge before it can
>    be committed)
>  - X: "unknown" change type (most probably a bug, please report it)
> --
> 2.33.0.rc2.dirty

Thanks, this change looks good to me, modulo the tiny comment on the
commit message about submodules being another file type.

      parent reply	other threads:[~2021-10-02 23:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 21:30 [PATCH 1/2] Documentation/diff-format: state in which cases porcelain status is T Johannes Altmanninger
2021-10-02 21:30 ` [PATCH 2/2] Documentation/git-status: document porcelain status T (typechange) Johannes Altmanninger
2021-10-02 21:33   ` Johannes Altmanninger
2021-10-02 23:29   ` Elijah Newren
2021-10-04 18:57     ` Johannes Altmanninger
2021-10-04 19:00     ` [PATCH v2 1/4] Documentation/git-status: remove impossible porcelain status DR and DC Johannes Altmanninger
2021-10-04 19:00       ` [PATCH v2 2/4] Documentation/diff-format: state in which cases porcelain status is T Johannes Altmanninger
2021-10-04 19:00       ` [PATCH v2 3/4] Documentation/git-status: document porcelain status T (typechange) Johannes Altmanninger
2021-10-04 19:00       ` [PATCH v2 4/4] Documentation/git-status: mention how to detect copies Johannes Altmanninger
2021-10-05  9:48         ` Bagas Sanjaya
2021-10-05 19:42           ` Johannes Altmanninger
2021-10-06  5:05             ` Bagas Sanjaya
2021-10-06  6:04               ` Elijah Newren
2021-10-04 20:02       ` [PATCH v2 1/4] Documentation/git-status: remove impossible porcelain status DR and DC Junio C Hamano
2021-10-04 20:12         ` Junio C Hamano
2021-10-02 23:35 ` Elijah Newren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABPp-BFyNamEVkEZsEhY9w3yCHg4uU-hkuHjvzj-BoGtvDBFZg@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=aclopte@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).