git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Q] "status" of files in (a part of) the working tree
@ 2008-10-15  7:53 Brian Foster
  2008-10-16 18:44 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Foster @ 2008-10-15  7:53 UTC (permalink / raw)
  To: Git Mailing List


Hello,

 For every file in a directory of my working tree,
 I want to obtain a quick "status" summary (ideally,
 recursively, i.e. descending into each sub-directory):
 E.g., not-tracked, latest modification is not in
 the index, latest modification is in the index,
 not-modified, and so on.  As a hypothetical example
 (`# comments' added to explain what the line means):

    $ git some-cmd
    ? foo      # not-tracked
    - bar      # tracked, not-modified
    M xyzzy    # tracked, last modification not-in-index
    I plover   # tracked, last modification in-the-index
     ...
    $ 

 The `git ls-files' command sort-of seems to almost do
 what I want, but not exactly.  For instance (this is
 written by hand but based on actual results):

    $ git version
    git version 1.6.0.2
    $ git ls-files --exclude-standard --others --modified --cached -t
    ? foo
    H bar
    H xyzzy
    C xyzzy
    ...
    $ 

 However, note that some files are listed twice (which
 is confusing for my purposes), and I'm uncertain I've
 specified all the magic to see all non-excluded files
 regardless of their "status".  Obviously, once I know
 the appropriate set of magic I should be able to write
 a filter to process the output and remove the unwanted
 duplicates, but I'm wondering if someone has a better
 suggestion?  Generalissimo Goggle didn't find any clews.

cheers!
	-blf-

-- 
“How many surrealists does it take to   | Brian Foster
 change a lightbulb? Three. One calms   | somewhere in south of France
 the warthog, and two fill the bathtub  |   Stop E$$o (ExxonMobil)!
 with brightly-coloured machine tools.” |      http://www.stopesso.com

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

* Re: [Q] "status" of files in (a part of) the working tree
  2008-10-15  7:53 [Q] "status" of files in (a part of) the working tree Brian Foster
@ 2008-10-16 18:44 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2008-10-16 18:44 UTC (permalink / raw)
  To: Brian Foster; +Cc: Git Mailing List

On Wed, Oct 15, 2008 at 09:53:42AM +0200, Brian Foster wrote:

>  For every file in a directory of my working tree,
>  I want to obtain a quick "status" summary (ideally,
>  recursively, i.e. descending into each sub-directory):
>  E.g., not-tracked, latest modification is not in
>  the index, latest modification is in the index,
>  not-modified, and so on.  As a hypothetical example
>  (`# comments' added to explain what the line means):
> 
>     $ git some-cmd
>     ? foo      # not-tracked
>     - bar      # tracked, not-modified
>     M xyzzy    # tracked, last modification not-in-index
>     I plover   # tracked, last modification in-the-index
>      ...
>     $ 

Check out this thread:

  http://thread.gmane.org/gmane.comp.version-control.git/97830/focus=98041

Hopefully Shawn will unveil his tool soon, and I expect there may be
some discussion about the preferred format.

-Peff

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

end of thread, other threads:[~2008-10-16 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15  7:53 [Q] "status" of files in (a part of) the working tree Brian Foster
2008-10-16 18:44 ` Jeff King

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).