From: Steven Grimm <koreth@midwinter.com>
To: A Large Angry SCM <gitzilla@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git-add fails after file type change
Date: Sat, 16 Dec 2006 16:19:04 -0800 [thread overview]
Message-ID: <45848CF8.4000704@midwinter.com> (raw)
In-Reply-To: <45843C5A.8020501@gmail.com>
A Large Angry SCM wrote:
> Did you try "git-update-index --replace dir"?
Turns out that doesn't work. It gives me the same error I get without
the --replace option:
error: dir: cannot add to the index - missing --add option?
fatal: Unable to process file dir
However, "git rm" followed by "git add" does seem to work. So for now it
looks like that'll be the best bet when I run into this problem (should
be possible to automate it, even.) The better error message from Junio's
patch will at least make the failure less mysterious.
IMO it'd still be nice if the porcelain could provide a "make the index
look like the working directory" operation that worked even in the face
of changes like this, adding and/or removing files as needed. But it's
possible that my crazy git-as-backup-device setup is the only place
where this is even an issue; typical git users can use "git mv" and
never run into the problem.
-Steve
next prev parent reply other threads:[~2006-12-17 0:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-16 18:16 git-add fails after file type change Steven Grimm
2006-12-16 18:31 ` Jakub Narebski
2006-12-16 18:44 ` Steven Grimm
2006-12-16 18:35 ` A Large Angry SCM
2006-12-16 21:58 ` Junio C Hamano
2006-12-16 22:40 ` Steven Grimm
2006-12-17 0:19 ` Steven Grimm [this message]
2006-12-17 0:46 ` Junio C Hamano
2006-12-17 1:39 ` Junio C Hamano
2006-12-17 9:11 ` [PATCH] git-add: remove conflicting entry when adding Junio C Hamano
2006-12-16 19:23 ` git-add fails after file type change Junio C Hamano
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=45848CF8.4000704@midwinter.com \
--to=koreth@midwinter.com \
--cc=git@vger.kernel.org \
--cc=gitzilla@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