diff options
author | Junio C Hamano <junkio@cox.net> | 2005-05-06 16:32:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-06 17:00:20 -0700 |
commit | 3d0291c4506f4bfa3869771e580b7304817fec00 (patch) | |
tree | d0d0625749d899ca21fcceb3ce9d2c650389272e /read-cache.c | |
parent | ee267527aa80807f37caf1d00bcf1b5263945adb (diff) | |
download | git-3d0291c4506f4bfa3869771e580b7304817fec00.tar.gz git-3d0291c4506f4bfa3869771e580b7304817fec00.tar.xz |
[PATCH] Do not initialize sha1_file_directory by hand.
Some commands initialize sha1_file_directory by hand. There is no
need to do so; sha1_file.c knows how to handle it.
The next patch will remove the variable altogether.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/read-cache.c b/read-cache.c index 6a04cf194..a6fbf0898 100644 --- a/read-cache.c +++ b/read-cache.c @@ -196,11 +196,6 @@ int read_cache(void) if (active_cache) return error("more than one cachefile"); errno = ENOENT; - sha1_file_directory = getenv(DB_ENVIRONMENT); - if (!sha1_file_directory) - sha1_file_directory = DEFAULT_DB_ENVIRONMENT; - if (access(sha1_file_directory, X_OK) < 0) - return error("no access to SHA1 file directory"); fd = open(get_index_file(), O_RDONLY); if (fd < 0) return (errno == ENOENT) ? 0 : error("open failed"); |