{"thread":{"id":"15866","subject":"Re: Fwd: git status options feature suggestion","startedAt":"2008-10-12T10:09:47Z","lastAt":"2008-10-18T00:19:47Z","messageCount":2,"participants":["Leo Razoumov","Fyn Fynn"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92829","messageId":"ee2a733e0810120309o1fbfa4dxe6f2292a28bd6db3@mail.gmail.com","threadId":"15866","inReplyTo":null,"subject":"Re: Fwd: git status options feature suggestion","fromName":"Leo Razoumov","fromEmail":"slonik.az@gmail.com","sentAt":"2008-10-12T10:09:47Z","receivedAt":"2008-10-12T10:09:47Z","isPatch":false,"sender":{"key":"slonik.az@gmail.com","avatar":null},"body":"On 10/12/08, Junio C Hamano <gitster@pobox.com> wrote:\n> [..snip..]\n> I was going to suggest the same.  \"git st\" for people who come from \"svn st\"\n>  so that \"git status\" can be kept as traditional \"preview of 'git commit'\".\n>\n>  And just make it mimic whatever folks accustomed to \"svn st\" would expect,\n>  modulo we would need two status letters to signal difference between\n>  (HEAD, index), and (index, worktree).  Perhaps three if you want to show\n>  difference between (HEAD, worktree) while at it.\n>\n>  And no, I have not seen any argument good enough to change ls-files nor\n>  diff-$lowlevel output and break people's existing scripts.\n>\n\nPlease, at least introduce a new option (--status-letters)  that makes\n\ngit log --name-status\ngit diff --name-status\ngit ls-files -v\n\nto use consistent letters to indicate the status. For details, see\nrecent discussion\nhttp://www.spinics.net/lists/git/msg81141.html\n\nThanks,\n--Leo--\n"},{"id":"93327","messageId":"1a04eebf0810171719r6b604a88n781bf43f0f047aae@mail.gmail.com","threadId":"15866","inReplyTo":"ee2a733e0810120309o1fbfa4dxe6f2292a28bd6db3@mail.gmail.com","subject":"Re: Fwd: git status options feature suggestion","fromName":"Fyn Fynn","fromEmail":"fynfynn@gmail.com","sentAt":"2008-10-18T00:19:47Z","receivedAt":"2008-10-18T00:19:47Z","isPatch":false,"sender":{"key":"fynfynn@gmail.com","avatar":null},"body":"Just wanted to chime in about a feature existing in Bazaar's and\nSubversion's and  \"status\" command: getting the status of tracked\nfiles _only_.\n\nHere's how the status -V switch works in Bazaar:\n\n~/foo$ bzr init\n~/foo$ echo \"content\" > bar.txt\n~/foo$ bzr add bar.txt\nadded bar.txt\n~/foo$ echo \"content\" > baz.txt\n~/foo$ bzr status\nadded:\n  bar.txt\nunknown:\n  baz.txt\n~/foo$ bzr status -V\nadded:\n  bar.txt\n\nAs you can see, the -V switch makes `bzr status` only display the\nstatus of files that are tracked.\n\nThis is very useful when you're tracking a \"skeleton\" of essential\nfiles in a directory tree that contains a large number of additional\nfiles and subdirectories, particularly if those are changing often and\n/ or are large/binary so it's impractical to control/ignore them.\n\nA common case of that: tracking a subset of configuration files under\none's home directory.\n\nRight now, there are two ways of getting around the lack of \"status\n-V\" (Subversion: \"status -q\") in git (credit for both goes to doener\non #git@FreeNode, who showed them to me):\n\ngit config --global alias.st 'diff --name-status HEAD'\n\nWhich makes `git st` output practically the same thing as  -V/-q in\nBazaar/Subversion. However, the output doesn't distinguish between\nStaged (indexed) and Unstaged (non-indexed) changes (a distinction\nthat the 2 other SCMs above don't support).\n\n\ngit config --global alias.st '!echo Staged:; git diff --cached\n--name-status; echo Unstaged:; git diff --name-status'\n\nWhich does distinguish between Staged and Unstaged, but is definitely\nsomething that can work only as an alias for frequent usage.\n\nIncidentally, a minor quibble with both solutions is that they require\nHEAD to exist; so you need to make at least one commit before you can\nuse them. For most users, this wouldn't frequently be a huge loss, but\nif you're commonly initializing branches, you might miss it. For\nexample, note how the above Bazaar example would fail with:\n\nfatal: ambiguous argument 'HEAD': unknown revision or path not in the\nworking tree.\n\n- Fyn\n"}]}