summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee26752)
raw | patch | inline | side by side (parent: ee26752)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 6 May 2005 23:32:28 +0000 (16:32 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 7 May 2005 00:00:20 +0000 (17:00 -0700) |
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>
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>
ls-tree.c | patch | blob | history | |
read-cache.c | patch | blob | history | |
tar-tree.c | patch | blob | history |
diff --git a/ls-tree.c b/ls-tree.c
index 339ac36a4cad45acd5d6769bed6c8b01c5da453a..7f8f8644afbcec3eac39230cabbd1298ceaa537d 100644 (file)
--- a/ls-tree.c
+++ b/ls-tree.c
usage(ls_tree_usage);
if (get_sha1(argv[1], sha1) < 0)
usage(ls_tree_usage);
- sha1_file_directory = getenv(DB_ENVIRONMENT);
- if (!sha1_file_directory)
- sha1_file_directory = DEFAULT_DB_ENVIRONMENT;
if (list(sha1) < 0)
die("list failed");
return 0;
diff --git a/read-cache.c b/read-cache.c
index 6a04cf194c98d1d04bee8f6748262d6e56bcbb46..a6fbf08982d7d2743c3998fed8d59d1de41365f5 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
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");
diff --git a/tar-tree.c b/tar-tree.c
index a09cb416595094e493a52dd7f45d943c81c0310a..9d9bd7be98502f64e4a643ef0973182f3483251e 100644 (file)
--- a/tar-tree.c
+++ b/tar-tree.c
usage(tar_tree_usage);
}
- sha1_file_directory = getenv(DB_ENVIRONMENT);
- if (!sha1_file_directory)
- sha1_file_directory = DEFAULT_DB_ENVIRONMENT;
-
buffer = read_object_with_reference(sha1, "commit", &size, commit_sha1);
if (buffer) {
write_global_extended_header(commit_sha1);