From: ZheNing Hu Date: Mon, 27 Jun 2022 11:18:51 GMT Subject: Re: [PATCH v4] ls-files: introduce "--format" option Message-ID: In-Reply-To: Junio C Hamano 于2022年6月27日周一 16:32写道: > > "ZheNing Hu via GitGitGadget" writes: > > > 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 > > +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. > > > > +eolinfo:index:: > > + The of the file which is recorded in the index. > > +eolinfo:worktree:: > > + The 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 (see the description of the `--eol` option) of > the contents in the index or in the worktree for the path > > perhaps? I dunno. > > > +eolattr:: > > + The 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 (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. > > +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.