projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mailinfo: barf and exist upon nested multipart.
[git.git]
/
local-pull.c
diff --git
a/local-pull.c
b/local-pull.c
index
7e47ec0
..
ca0003b
100644
(file)
--- a/
local-pull.c
+++ b/
local-pull.c
@@
-17,7
+17,7
@@
void prefetch(unsigned char *sha1)
static struct packed_git *packs = NULL;
static struct packed_git *packs = NULL;
-void setup_index(unsigned char *sha1)
+
static
void setup_index(unsigned char *sha1)
{
struct packed_git *new_pack;
char filename[PATH_MAX];
{
struct packed_git *new_pack;
char filename[PATH_MAX];
@@
-30,7
+30,7
@@
void setup_index(unsigned char *sha1)
packs = new_pack;
}
packs = new_pack;
}
-
int setup_indices(
)
+
static int setup_indices(void
)
{
DIR *dir;
struct dirent *de;
{
DIR *dir;
struct dirent *de;
@@
-43,13
+43,13
@@
int setup_indices()
if (namelen != 50 ||
strcmp(de->d_name + namelen - 5, ".pack"))
continue;
if (namelen != 50 ||
strcmp(de->d_name + namelen - 5, ".pack"))
continue;
- get_sha1_hex(
sha1, de->d_name + 5
);
+ get_sha1_hex(
de->d_name + 5, sha1
);
setup_index(sha1);
}
return 0;
}
setup_index(sha1);
}
return 0;
}
-int copy_file(const char *source, const char *dest, const char *hex)
+
static
int copy_file(const char *source, const char *dest, const char *hex)
{
if (use_link) {
if (!link(source, dest)) {
{
if (use_link) {
if (!link(source, dest)) {
@@
-97,7
+97,7
@@
int copy_file(const char *source, const char *dest, const char *hex)
return -1;
}
return -1;
}
-
int fetch_pack(
unsigned char *sha1)
+
static int fetch_pack(const
unsigned char *sha1)
{
struct packed_git *target;
char filename[PATH_MAX];
{
struct packed_git *target;
char filename[PATH_MAX];
@@
-114,16
+114,18
@@
int fetch_pack(unsigned char *sha1)
sha1_to_hex(sha1));
}
sprintf(filename, "%s/objects/pack/pack-%s.pack",
sha1_to_hex(sha1));
}
sprintf(filename, "%s/objects/pack/pack-%s.pack",
- path, sha1_to_hex(sha1));
- copy_file(filename, sha1_pack_name(sha1), sha1_to_hex(sha1));
+ path, sha1_to_hex(target->sha1));
+ copy_file(filename, sha1_pack_name(target->sha1),
+ sha1_to_hex(target->sha1));
sprintf(filename, "%s/objects/pack/pack-%s.idx",
sprintf(filename, "%s/objects/pack/pack-%s.idx",
- path, sha1_to_hex(sha1));
- copy_file(filename, sha1_pack_index_name(sha1), sha1_to_hex(sha1));
+ path, sha1_to_hex(target->sha1));
+ copy_file(filename, sha1_pack_index_name(target->sha1),
+ sha1_to_hex(target->sha1));
install_packed_git(target);
return 0;
}
install_packed_git(target);
return 0;
}
-
int fetch_file(
unsigned char *sha1)
+
static int fetch_file(const
unsigned char *sha1)
{
static int object_name_start = -1;
static char filename[PATH_MAX];
{
static int object_name_start = -1;
static char filename[PATH_MAX];