git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Documentation/diff-format: state in which cases porcelain status is T

From
Elijah Newren <newren@gmail.com>
Date
Oct 2, 2021, 23:35 UTC
Message-ID
<CABPp-BFyNamEVkEZsEhY9w3yCHg4uU-hkuHjvzj-BoGtvDBFZg@mail.gmail.com>
In-Reply-To
<20211002213046.725892-1-aclopte@gmail.com>
On Sat, Oct 2, 2021 at 2:38 PM Johannes Altmanninger <aclopte@gmail.com> wrote:
Show 6 quoted lines
>
> 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.

Show 31 quoted lines
> 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.

Previous: Junio C Hamano
Message 16 of 16 in “Documentation/diff-format: state in which cases porcelain status is T”
  1. 1/2 Documentation/diff-format: state in which cases porcelain status is TJohannes Altmanninger, Oct 2, 2021
  2. 2/2 Documentation/git-status: document porcelain status T (typechange)Johannes Altmanninger, Oct 2, 2021
  3. Johannes AltmanningerOct 2, 2021
  4. Elijah NewrenOct 2, 2021
  5. Johannes AltmanningerOct 4, 2021
  6. 1/4 Documentation/git-status: remove impossible porcelain status DR and DCJohannes Altmanninger, Oct 4, 2021
  7. 2/4 Documentation/diff-format: state in which cases porcelain status is TJohannes Altmanninger, Oct 4, 2021
  8. 3/4 Documentation/git-status: document porcelain status T (typechange)Johannes Altmanninger, Oct 4, 2021
  9. 4/4 Documentation/git-status: mention how to detect copiesJohannes Altmanninger, Oct 4, 2021
  10. Bagas SanjayaOct 5, 2021
  11. Johannes AltmanningerOct 5, 2021
  12. Bagas SanjayaOct 6, 2021
  13. Elijah NewrenOct 6, 2021
  14. Junio C HamanoOct 4, 2021
  15. Junio C HamanoOct 4, 2021
  16. Elijah NewrenOct 2, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.