git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Yin Ping <pkufranky@gmail.com>
Cc: Michel Marti <mma@objectxp.com>, git@vger.kernel.org
Subject: Re: Feature request: Limit git-status reports to a directory
Date: Thu, 25 Oct 2007 10:55:12 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710251050390.25221@racer.site> (raw)
In-Reply-To: <46dff0320710241914t7d93aae1t991fbcaacde77046@mail.gmail.com>

Hi,

On Thu, 25 Oct 2007, Yin Ping wrote:

> On 10/25/07, Michel Marti <mma@objectxp.com> 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

  reply	other threads:[~2007-10-25  9:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 22:01 Feature request: Limit git-status reports to a directory Michel Marti
2007-10-25  2:14 ` Yin Ping
2007-10-25  9:55   ` Johannes Schindelin [this message]
2007-10-25 13:03     ` Wincent Colaiuta
2007-10-25 13:03     ` Michel Marti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0710251050390.25221@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=mma@objectxp.com \
    --cc=pkufranky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).