summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-12-30 22:29:04 -0800
committerShawn O. Pearce <spearce@spearce.org>2008-12-30 22:29:04 -0800
commitffb55c532ccc1cb3c47eeeaac6c64240ab88fe29 (patch)
treeaeef9c0679084b1a3048b81831d4ef3d9d7eb10f /src
parent4c67e2e95f0bb6f0e214bd7bf052f914d365f129 (diff)
downloadlibgit2-ffb55c532ccc1cb3c47eeeaac6c64240ab88fe29.tar.gz
Rename the path of the objects directory to be more specific
We're likely to add additional path data, like the path of the refs or the path to the config file into the git_odb structure, as it may grow into the repository wrapper. Changing the name of the objects directory reference makes it more clear should we later add something else. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src')
-rw-r--r--src/odb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/odb.c b/src/odb.c
index f57c220bb..e96aa1e25 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -32,7 +32,7 @@
struct git_odb {
/** Path to the "objects" directory. */
- char *path;
+ char *objects_dir;
/** Alternate databases to search. */
git_odb **alternates;
@@ -428,8 +428,8 @@ int git_odb_open(git_odb **out, const char *objects_dir)
if (!db)
return GIT_ERROR;
- db->path = strdup(objects_dir);
- if (!db->path) {
+ db->objects_dir = strdup(objects_dir);
+ if (!db->objects_dir) {
free(db);
return GIT_ERROR;
}
@@ -452,7 +452,7 @@ void git_odb_close(git_odb *db)
free(db->alternates);
}
- free(db->path);
+ free(db->objects_dir);
free(db);
}
@@ -484,7 +484,7 @@ int git_odb__read_loose(git_obj *out, git_odb *db, const git_oid *id)
out->len = 0;
out->type = GIT_OBJ_BAD;
- if (object_file_name(file, sizeof(file), db->path, id))
+ if (object_file_name(file, sizeof(file), db->objects_dir, id))
return GIT_ENOTFOUND; /* TODO: error handling */
if (gitfo_read_file(&obj, file))