Junio C Hamano [off-list ref] writes:
Michael Haggerty [off-list ref] writes:
quoted
I was just alerted by Scott Chacon's blog [1] to the fact that one can
set GIT_INDEX_FILE to an arbitrary filename, thereby causing the index
to be read/written from that file instead of $GIT_DIR/index.
That's very old fashioned. For almost five years, the preferred way to
say that has been "git read-tree --index-output=file" ;-)
Ah, I take that back.
There is any benefit to be had by using "read-tree --index-output" in the
way used in your check-attr example. Setting up a single GIT_INDEX_FILE
and using it throughout as you did is indeed much more preferrable.
But what you outlined should work.