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

Re: git-ls-files --added?

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 26, 2009, 00:56 UTC
Message-ID
<2cfc40320905251756t32e092fdqda769e21669f5d86@mail.gmail.com>
In-Reply-To
<7vws85y9n7.fsf@alter.siamese.dyndns.org>
Thanks for your answer's Junio.

I am indeed writing some porcelain. I currently have some bash tooling that wraps bash which does useful things for primarily linear development in the subversion world [ trunk + well-controlled branches ] and in order to ease the transition of the organization to full-blown adoption of git, I'd like to provide some equivalents that operate in git land.

scm unknown [ equivalent to not added to index yet ] scm broken [ equivalent to deleted from working tree but not index ] scm uncommittable [ union of unknown and broken ] scm added scm modified scm deleted scm other [ cases I didn't think of yet ]

I am happy to munge these together with bash, but I thought I'd just +1 the general requirement.

jon.
On Mon, May 25, 2009 at 4:33 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 27 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Jon Seymour <jon.seymour@gmail.com> writes:
>> ...
>>> I am still interested in the rationale for git-ls-files not supporting
>>> such an option directly, since git-diff still seems a little indirect.
>>
>> Partly historical, but more fundamental reason is because ls-files
>> plumbing is about the index.
>> ...
>> Added is _not_ about comparision between the index and the work tree.  It
>> is between the HEAD commit and the index, and it does not belong to
>> ls-files plumbing.
>
> Having said all that, I think you might be interested in pursuing
>
>  http://thread.gmane.org/gmane.comp.version-control.git/97830/focus=99134
>
> Also, the following thread may serve as a food for thought; it shows that
> there is real need for some concise, easy to parse output for people who
> want their own Porcelain.
>
>  http://thread.gmane.org/gmane.comp.version-control.git/106122/focus=108110
>
> In short, ls-files and diff-index _can_ give you what you want, but often
> people would want information from both, consolidated.
>
Previous: Björn SteinbrinkNext: David Aguilar
Message 8 of 13 in “git-ls-files --added?”
  1. Jon SeymourMay 24, 2009
  2. Jakub NarebskiMay 24, 2009
  3. Jon SeymourMay 24, 2009
  4. Junio C HamanoMay 24, 2009
  5. Junio C HamanoMay 25, 2009
  6. Constantine PlotnikovMay 25, 2009
  7. Björn SteinbrinkMay 25, 2009
  8. Jon SeymourMay 26, 2009
  9. David AguilarMay 29, 2009
  10. Nanako ShiraishiMay 29, 2009
  11. Junio C HamanoMay 29, 2009
  12. David AguilarMay 30, 2009
  13. Tony FinchMay 31, 2009

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.