Re: git-ls-files --added?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Seymour <jon.seymour@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]