git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Miles Bader <miles@gnu.org>, git@vger.kernel.org
Subject: Re: git-diff new files (without using index)
Date: Sat, 04 Aug 2007 21:20:43 -0700	[thread overview]
Message-ID: <7vd4y2ipd0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070805040841.GG9527@spearce.org> (Shawn O. Pearce's message of "Sun, 5 Aug 2007 00:08:41 -0400")

"Shawn O. Pearce" <spearce@spearce.org> writes:

>> The above sort of quirkiness does seem kind of a wart though; in my
>> (admittedly limited, using git) experience this sort of thing really
>> reduces the utility of the index, and I often end up feeling like it's
>> just getting in the way as a result.  Does adding something like a
>> "git-diff -N" option seem a _bad_ idea?
>
> I'm not interested in such an option.  Typically if I want a
> diff on a new untracked file I actually want that file in my next
> commit anyway.

I suspect that it's probably half superstition and half disease
to wish for "diff /dev/null new-file".  Even CVS got this one
right by saying "is a new file, no diff available".  The
contents of that new file is available in "less new-file" near
you anyway and it is quite pointless while you are working
toward next commit.  It just is not interesting, until you tell
git you _care_ about that file.  And the way you tell git about
it is with "git add".

Learn to love the index, run "git-add" and view "git-diff HEAD".

  reply	other threads:[~2007-08-05  4:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-05  3:42 git-diff new files (without using index) Miles Bader
2007-08-05  3:52 ` Shawn O. Pearce
2007-08-05  4:00   ` Miles Bader
2007-08-05  4:08     ` Shawn O. Pearce
2007-08-05  4:20       ` Junio C Hamano [this message]
2007-08-05  4:37         ` Miles Bader

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=7vd4y2ipd0.fsf@assigned-by-dhcp.cox.net \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=miles@gnu.org \
    --cc=spearce@spearce.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;
as well as URLs for NNTP newsgroup(s).