diff options
author | Sven Strickroth <email@cs-ware.de> | 2011-10-04 01:12:43 +0400 |
---|---|---|
committer | Sven Strickroth <email@cs-ware.de> | 2011-10-04 01:28:24 +0400 |
commit | 599297fdc3eb003a40ee78489af28d968f76a835 (patch) | |
tree | aa0241285f6dda1cdacfe1c9952df2fa05c97e62 /src/odb_pack.c | |
parent | cd19ca9584bd01925e05e94e7f3bddae6880acda (diff) |
ignore missing pack file as git does
See http://code.google.com/p/tortoisegit/issues/detail?id=862
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r-- | src/odb_pack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c index 4607fb74a..a8f854236 100644 --- a/src/odb_pack.c +++ b/src/odb_pack.c @@ -224,7 +224,10 @@ static int packfile_load__cb(void *_data, char *path) } error = git_packfile_check(&pack, path); - if (error < GIT_SUCCESS) + if (error == GIT_ENOTFOUND) { + /* ignore missing .pack file as git does */ + return GIT_SUCCESS; + } else if (error < GIT_SUCCESS) return git__rethrow(error, "Failed to load packfile"); if (git_vector_insert(&backend->packs, pack) < GIT_SUCCESS) { |