Thread (35 messages) 35 messages, 7 authors, 2022-09-11

Re: [PATCH v4] ls-files: introduce "--format" option

From: ZheNing Hu <hidden>
Date: 2022-06-27 11:19:09

Junio C Hamano [off-list ref] 于2022年6月27日周一 16:32写道:
"ZheNing Hu via GitGitGadget" [off-list ref] writes:
quoted
Range-diff vs v3:
...
      +test_done
I omitted 300 lines of range-diff, which is not exactly illuminating
in this case.  I wonder if there is a way to turn it off when it is
not helping automatically...
I have make a issue to gitgitgadget, maybe Johannes Schindelin can
give a help: https://github.com/gitgitgadget/gitgitgadget/issues/1024
quoted
+FIELD NAMES
+-----------
+Various values from structured fields can be used to interpolate
+into the resulting output. For each outputting line, the following
+names can be used:
+
+objectmode::
+     The mode of the file which is recorded in the index.
+objectname::
+     The name of the file which is recorded in the index.
+stage::
+     The stage of the file which is recorded in the index.
quoted
+eolinfo:index::
+     The <eolinfo> of the file which is recorded in the index.
+eolinfo:worktree::
+     The <eolinfo> of the file which is recorded in the working tree.
These sound somewhat strange, as the above makes it sound as if we
are recording eolinfo for something (we never record eolinfo of
anything anywhere).

        eolinfo:index::
        eolinfo:worktree::
                The <eolinfo> (see the description of the `--eol` option) of
                the contents in the index or in the worktree for the path

perhaps?  I dunno.
quoted
+eolattr::
+     The <eolattr> of the file which is recorded in the index.
Likewise, eolattr comes from the attribute subsystem and not
recorded in the index.  It is more like

        eolattr:
                The <eolattr> (see the description of the `--eol` option)
                that applies to the path.

Because attribute applies to the path, it applies equally to both
what is in the index and what is in the working tree.
Thanks for clarifying it, I will fix it.
quoted
+path::
+     The pathname of the file which is recorded in the index.
As ls-tree already uses %(path) for it, this is probably OK
(otherwise we would probably have called it %(pathname)).
Agree. Unless we want to fix it in git ls-tree too.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help