From: Phillip Wood Date: Tue, 28 Jun 2022 15:19:25 GMT Subject: Re: [PATCH v4] ls-files: introduce "--format" option Message-ID: In-Reply-To: Hi ZheNing This looks good, I don't have much to add beyond the comments others have left. On 26/06/2022 16:29, ZheNing Hu via GitGitGadget wrote: > From: ZheNing Hu > +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. > +eolattr:: > + The of the file which is recorded in the index. > +path:: > + The pathname of the file which is recorded in the index. I think starting with this shorter list of field names is a good idea, we can always add more fields later if there is a demand for %(flags) etc. > +test_expect_success 'git ls-files --format with --debug' ' > + git ls-files --debug >expect && > + git ls-files --format="%(path)" --debug >actual && > + test_cmp expect actual > +' What's the motivation for being able to combine --format with --debug? Best Wishes Phillip