git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to list all files that will be comitted
@ 2008-06-25 15:31 Rhodes, Kate
  2008-06-25 15:57 ` Ian Hilt
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rhodes, Kate @ 2008-06-25 15:31 UTC (permalink / raw)
  To: git

I know ls-files is the tool I need but I haven't been able to figure  
out what combination of options will give me the files that have been  
added to the index.

-Kate

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 15:31 how to list all files that will be comitted Rhodes, Kate
@ 2008-06-25 15:57 ` Ian Hilt
  2008-06-25 16:01   ` Rhodes, Kate
  2008-06-25 16:14 ` Reece Dunn
  2008-06-25 16:19 ` Michael J Gruber
  2 siblings, 1 reply; 8+ messages in thread
From: Ian Hilt @ 2008-06-25 15:57 UTC (permalink / raw)
  To: Rhodes, Kate; +Cc: git

On Wed, 25 Jun 2008 at 11:31am -0400, Rhodes, Kate wrote:

> I know ls-files is the tool I need but I haven't been able to figure out what
> combination of options will give me the files that have been added to the
> index.
> 
> -Kate

Have you tried "git status" ?  It will output something similar to the
following:

# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   somefile
#
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#	modified:   anotherfile
#


-- 
Ian Hilt
Ian.Hilt (at) gmx.com
GnuPG key: 0x4AFC1EE3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 15:57 ` Ian Hilt
@ 2008-06-25 16:01   ` Rhodes, Kate
  2008-06-25 16:14     ` Karl Hasselström
  2008-06-25 16:24     ` Ian Hilt
  0 siblings, 2 replies; 8+ messages in thread
From: Rhodes, Kate @ 2008-06-25 16:01 UTC (permalink / raw)
  To: Ian Hilt; +Cc: git

yeah, but i was hoping for plumbing, not porcelain, that showed just  
what i wanted so that i didn't have to parse status' output.

-Kate

On Jun 25, 2008, at 11:57 AM, Ian Hilt wrote:

> Have you tried "git status" ?  It will output something similar to the
> following:

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 15:31 how to list all files that will be comitted Rhodes, Kate
  2008-06-25 15:57 ` Ian Hilt
@ 2008-06-25 16:14 ` Reece Dunn
  2008-06-25 16:19 ` Michael J Gruber
  2 siblings, 0 replies; 8+ messages in thread
From: Reece Dunn @ 2008-06-25 16:14 UTC (permalink / raw)
  To: Rhodes, Kate; +Cc: git

2008/6/25 Rhodes, Kate <masukomi@gmail.com>:
> I know ls-files is the tool I need but I haven't been able to figure out
> what combination of options will give me the files that have been added to
> the index.
>
> -Kate

`git status` will do this, unless you need to do additional processing
on the results.

HTH,
- Reece

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 16:01   ` Rhodes, Kate
@ 2008-06-25 16:14     ` Karl Hasselström
  2008-06-25 16:16       ` Rhodes, Kate
  2008-06-25 16:24     ` Ian Hilt
  1 sibling, 1 reply; 8+ messages in thread
From: Karl Hasselström @ 2008-06-25 16:14 UTC (permalink / raw)
  To: Rhodes, Kate; +Cc: Ian Hilt, git

On 2008-06-25 12:01:49 -0400, Rhodes, Kate wrote:

> yeah, but i was hoping for plumbing, not porcelain, that showed just
> what i wanted so that i didn't have to parse status' output.

Unless you want a listing of all the files in the index, you probably
want to call diff-index.

  git diff-index --cached <tree-ish>

gives you the diff between the index and a tree-ish. With the
--name-only option, you get only the filenames and not all the modes,
blob sha1s, etc.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 16:14     ` Karl Hasselström
@ 2008-06-25 16:16       ` Rhodes, Kate
  0 siblings, 0 replies; 8+ messages in thread
From: Rhodes, Kate @ 2008-06-25 16:16 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: Ian Hilt, git

Perfect, exactly what I wanted. Thanks.

-Kate


On Jun 25, 2008, at 12:14 PM, Karl Hasselström wrote:

> On 2008-06-25 12:01:49 -0400, Rhodes, Kate wrote:
>
>> yeah, but i was hoping for plumbing, not porcelain, that showed just
>> what i wanted so that i didn't have to parse status' output.
>
> Unless you want a listing of all the files in the index, you probably
> want to call diff-index.
>
>  git diff-index --cached <tree-ish>
>
> gives you the diff between the index and a tree-ish. With the
> --name-only option, you get only the filenames and not all the modes,
> blob sha1s, etc.
>
> -- 
> Karl Hasselström, kha@treskal.com
>      www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 15:31 how to list all files that will be comitted Rhodes, Kate
  2008-06-25 15:57 ` Ian Hilt
  2008-06-25 16:14 ` Reece Dunn
@ 2008-06-25 16:19 ` Michael J Gruber
  2 siblings, 0 replies; 8+ messages in thread
From: Michael J Gruber @ 2008-06-25 16:19 UTC (permalink / raw)
  To: git

Rhodes, Kate venit, vidit, dixit 25.06.2008 17:31:
> I know ls-files is the tool I need but I haven't been able to figure  
> out what combination of options will give me the files that have been  
> added to the index.

I don't think git ls-files does that, but

git diff --cached --name-only

will.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: how to list all files that will be comitted
  2008-06-25 16:01   ` Rhodes, Kate
  2008-06-25 16:14     ` Karl Hasselström
@ 2008-06-25 16:24     ` Ian Hilt
  1 sibling, 0 replies; 8+ messages in thread
From: Ian Hilt @ 2008-06-25 16:24 UTC (permalink / raw)
  To: Rhodes, Kate; +Cc: git

On Wed, 25 Jun 2008 at 12:01pm -0400, Rhodes, Kate wrote:

> yeah, but i was hoping for plumbing, not porcelain, that showed just what i
> wanted so that i didn't have to parse status' output.

I wasn't able to make "git ls-files" do what you want.  However, "git
diff --name-only --cached" did.  It's still porcelain, but it does what
you want :)


-- 
Ian Hilt
Ian.Hilt (at) gmx.com
GnuPG key: 0x4AFC1EE3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-06-25 16:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 15:31 how to list all files that will be comitted Rhodes, Kate
2008-06-25 15:57 ` Ian Hilt
2008-06-25 16:01   ` Rhodes, Kate
2008-06-25 16:14     ` Karl Hasselström
2008-06-25 16:16       ` Rhodes, Kate
2008-06-25 16:24     ` Ian Hilt
2008-06-25 16:14 ` Reece Dunn
2008-06-25 16:19 ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).