Re: Feature request: Limit git-status reports to a directory

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

 



Hi,

On Thu, 25 Oct 2007, Yin Ping wrote:

> On 10/25/07, Michel Marti <mma@xxxxxxxxxxxx> wrote:
> > I am sometimes interested in only seeing the status for a specific 
> > directory (and its sub-directories), but git-status is no help in this 
> > case - passing a directory does some sort of "git-commit --dry-run". I 
> > first thought that this is a bug until I saw in the man-page that this 
> > is actually a feature...
>
> It's also painful for me. IMHO, the behaviour of "git-status" should 
> keep consistent with "git-diff" and "git-log" which allow for the path.

I am not so sure.  In other SCMs, "git status" may be a way to do "git 
diff --name-only" or "git ls-files", but not in git.  Here, it strictly 
means "what would be happening if I were to commit _right_ _now_?".

> Another point, It will be helpful to add a config item to change the 
> default behaviour for 'git-diff" and "git-log". For example, 
> 'diff.defaultcurrentpath=true' to let git only show difference in 
> current directory instead of difference in top directory when typing 
> 'git-diff'

IMHO it is not asking users too much when you say "git diff ." is for the 
current directory, and "git diff" is for the whole working tree.

Besides, we cannot really change the default behaviour, since some 
porcelains use "git log" (and certainly there are some which use "git 
diff", too).  They would suffer from this unexpected -- and indeed 
inconsistent, since the setting can differ between repositories -- output.

Hth,
Dscho



-
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]

  Powered by Linux