Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Andy Parkins <andyparkins@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Enter interactive mode if no parameters are given to git-add
Date: Tue, 19 Dec 2006 10:00:44 -0800	[thread overview]
Message-ID: <7vy7p3pxyr.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200612191516.09606.andyparkins@gmail.com> (Andy Parkins's message of "Tue, 19 Dec 2006 15:16:09 +0000")

Andy Parkins <andyparkins@gmail.com> writes:

> git-add with no parameters previously adds every modified file.  This
> patch instead makes git-add enter interactive mode.
> ...
> It seemed a bit nasty to add content without explicit instructions to do
> so.

Does anybody rely on the current behaviour?

It is nasty and I consider it a bug.  It appears that it has
been like that since the days when it was still a shell script.

While I think nobody should drive 'git add' from script, the
behaviour to add everything when there is no explicit parameter
(or fall back to interactive for that matter) has a problem if
you say "some command | xargs git-add --" (you need "xargs -r"
to fix it, which is GNU).

Let's first have a patch to exit with a warning message (but
status 0) without doing anything when there is no explicit
paths.

Again, does anybody rely on the current behaviour?


  parent reply	other threads:[~2006-12-19 18:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-19 15:16 [PATCH] Enter interactive mode if no parameters are given to git-add Andy Parkins
2006-12-19 16:42 ` Jakub Narebski
2006-12-19 18:00 ` Junio C Hamano [this message]
2006-12-19 19:04   ` Linus Torvalds

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=7vy7p3pxyr.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /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