git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaun Ruffell <sruffell@digium.com>
To: Jeff King <peff@peff.net>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
	seanh <snhmnd@gmail.com>,
	git@vger.kernel.org
Subject: Re: Files that cannot be added to the index
Date: Sat, 27 Aug 2011 14:26:55 -0500	[thread overview]
Message-ID: <20110827192655.GA14333@digium.com> (raw)
In-Reply-To: <20110827184009.GA12767@digium.com>

On Sat, Aug 27, 2011 at 01:40:09PM -0500, Shaun Ruffell wrote:
> 
> So, in summary, it looks like this is fixed.

Actually, after playing with it a little more on OSX, I think it was
just operator error on my part and that, for this, the versions are
behaving the same.

Adding a non-existent file produces an error:
  $ git add adjaskdj
  fatal: pathspec 'adjaskdj' did not match any files

Adding a file that is on the filesystem but only differs in case with a
file in the index silently fails:

  $ mv Makefile makefile
  $ echo "hello" >> makefile
  $ git ls-files -m
  Makefile
  $ git add makefile

And then when you try to commit the file you just added it fails:

  $ git commit
  # On branch master
  # Changes not staged for commit:
  #   (use "git add <file>..." to update what will be committed)
  #   (use "git checkout -- <file>..." to discard changes in working directory)
  #
  #	modified:   Makefile
  #
  no changes added to commit (use "git add" and/or "git commit -a")

Adding a file that is in the index, but only differs by case with a file
in the filesystem works:

  $ git add Makefile
  $ git commit -m "test"
  [master 8de0bd6] test
   1 files changed, 1 insertions(+), 0 deletions(-)

  reply	other threads:[~2011-08-27 19:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 12:26 Files that cannot be added to the index seanh
2011-08-26 14:10 ` Michael J Gruber
2011-08-26 20:59   ` seanh
2011-08-26 21:12     ` Shaun Ruffell
2011-08-27  6:07       ` Jeff King
2011-08-27 15:39         ` seanh
2011-08-27 18:40         ` Shaun Ruffell
2011-08-27 19:26           ` Shaun Ruffell [this message]
2011-08-27 15:35       ` seanh
2011-08-27 21:44         ` seanh

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=20110827192655.GA14333@digium.com \
    --to=sruffell@digium.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=snhmnd@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).