Re: git-ls-files --added?
- From
Jon Seymour <jon.seymour@gmail.com>
- Date
- May 24, 2009, 09:12 UTC
- Message-ID
- <2cfc40320905240212jc111b1xfeb39b1851c606d3@mail.gmail.com>
- In-Reply-To
- <m3fxeudhho.fsf@localhost.localdomain>
Jakub,
Thanks - yes, I wasn't happy about parsing git status.
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.
Regards,
jon.
On Sun, May 24, 2009 at 6:37 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 18 quoted lines
> Jon Seymour <jon.seymour@gmail.com> writes: > >> Is there a reason why git-ls-files does not have an --added option? >> >> I'd like to get a list of new files, due to be committed. Currently, I >> have to parse the output of git status to get that, but it seems like >> a reasonable function for git-ls-files. > > You can use git-diff-* with --name-only and --diff-filter=A for > that; you shouldn't parse result of porcelain git-status. > > And there is also contrib/examples/git-commit.sh as a guideline... > > -- > Jakub Narebski > Poland > ShadeHawk on #git >