From fdc8a7dbeac18554ea0c588310c492a0d050d423 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Tue, 17 Jan 2012 14:06:35 +0100 Subject: [PATCH 1/3] Fix MSVC compilation warning --- src/win32/posix_w32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index f68742fc0..3786f0162 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -80,7 +80,7 @@ static int do_lstat(const char *file_name, struct stat *buf) buf->st_uid = 0; buf->st_nlink = 1; buf->st_mode = (mode_t)fMode; - buf->st_size = (fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow; + buf->st_size = ((git_off_t)fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow; buf->st_dev = buf->st_rdev = (_getdrive() - 1); buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime)); buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime)); From 86360ffdf7829d5cd12000067b9e73d3814e2347 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Tue, 17 Jan 2012 14:33:26 +0100 Subject: [PATCH 2/3] transport: prevent the transport determination mechanism from segfaulting when being passed an url starting with an unknown prefix --- src/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transport.c b/src/transport.c index d836561b4..00b79dc6d 100644 --- a/src/transport.c +++ b/src/transport.c @@ -23,7 +23,7 @@ static struct { {NULL, 0} }; -#define GIT_TRANSPORT_COUNT (sizeof(transports)/sizeof(transports[0])) +#define GIT_TRANSPORT_COUNT (sizeof(transports)/sizeof(transports[0])) - 1 static git_transport_cb transport_find_fn(const char *url) { From 0b44c06599a446edb7523a9eead207817798111b Mon Sep 17 00:00:00 2001 From: nulltoken Date: Tue, 17 Jan 2012 14:35:04 +0100 Subject: [PATCH 3/3] repository: add the invalid repository path to the error message --- src/repository.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository.c b/src/repository.c index a408599f7..67bfcc916 100644 --- a/src/repository.c +++ b/src/repository.c @@ -169,7 +169,7 @@ int git_repository_open(git_repository **repo_out, const char *path) if (quickcheck_repository_dir(&path_buf) < GIT_SUCCESS) { error = git__throw(GIT_ENOTAREPO, - "The given path is not a valid Git repository"); + "The given path (%s) is not a valid Git repository", git_buf_cstr(&path_buf)); goto cleanup; }