author | Junio C Hamano <junkio@cox.net> | |
Sun, 1 Apr 2007 06:09:02 +0000 (23:09 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 4 Apr 2007 06:44:32 +0000 (23:44 -0700) | ||
commit | 30ca07a249744e57163c02250fca420cea364299 | |
tree | 67cfa219ff2e8e5c293d3f2e7eb475093e354771 | tree | snapshot |
parent | 89815cab95268e8f0f58142b848ac4cd5e9cbdcb | commit | diff |
_GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file.
When defined, this allows plumbing commands that update the
index (add, apply, checkout-index, merge-recursive, mv,
read-tree, rm, update-index, and write-tree) to write their
resulting index to an alternative index file while holding a
lock to the original index file. With this, git-commit that
jumps the index does not have to make an extra copy of the index
file, and more importantly, it can do the update while holding
the lock on the index.
However, I think the interface to let an environment variable
specify the output is a mistake, as shown in the documentation.
If a curious user has the environment variable set to something
other than the file GIT_INDEX_FILE points at, almost everything
will break. This should instead be a command line parameter to
tell these plumbing commands to write the result in the named
file, to prevent stupid mistakes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When defined, this allows plumbing commands that update the
index (add, apply, checkout-index, merge-recursive, mv,
read-tree, rm, update-index, and write-tree) to write their
resulting index to an alternative index file while holding a
lock to the original index file. With this, git-commit that
jumps the index does not have to make an extra copy of the index
file, and more importantly, it can do the update while holding
the lock on the index.
However, I think the interface to let an environment variable
specify the output is a mistake, as shown in the documentation.
If a curious user has the environment variable set to something
other than the file GIT_INDEX_FILE points at, almost everything
will break. This should instead be a command line parameter to
tell these plumbing commands to write the result in the named
file, to prevent stupid mistakes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
13 files changed:
Documentation/git.txt | diff | blob | history | |
builtin-add.c | diff | blob | history | |
builtin-apply.c | diff | blob | history | |
builtin-checkout-index.c | diff | blob | history | |
builtin-mv.c | diff | blob | history | |
builtin-read-tree.c | diff | blob | history | |
builtin-rm.c | diff | blob | history | |
builtin-update-index.c | diff | blob | history | |
builtin-write-tree.c | diff | blob | history | |
cache.h | diff | blob | history | |
git-commit.sh | diff | blob | history | |
lockfile.c | diff | blob | history | |
merge-recursive.c | diff | blob | history |