Daniel Barkalow <[EMAIL PROTECTED]> writes:

>> > If you don't use -f, git-checkout-script removes deleted files. Using -f
>> > tells it to ignore the old index, which means that it can't tell the
>> > difference between removed files and files that weren't tracked at all.

Yes and no.  "git checkout" assumes that the index file and the
working tree somewhat resembles what is in .git/HEAD commit.
Since push operation updates .git/HEAD commit without touching
the index file, that assumption does not hold.

The update hook gets old commit name and new commit name, so you
should be able to do (untested):

    git-read-tree -m -u $old_commit $new_commit

there, of course after making sure that you had old_commit (the
first time push happens to a new ref you would not have that one).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to