Re: GSoC proposal: port pack bitmap support to libgit2.

2014-03-20 Thread Yuxuan Shui
Hi, Sorry for this late reply, I was busy for past few days. On Fri, Mar 14, 2014 at 12:34 PM, Jeff King wrote: > On Wed, Mar 12, 2014 at 04:19:23PM +0800, Yuxuan Shui wrote: > >> I'm Yuxuan Shui, a undergraduate student from China. I'm applying for >> GSoC 2

Re: GSoC proposal: port pack bitmap support to libgit2.

2014-03-13 Thread Yuxuan Shui
Hi, On Wed, Mar 12, 2014 at 4:19 PM, Yuxuan Shui wrote: > Hi, > > I'm Yuxuan Shui, a undergraduate student from China. I'm applying for > GSoC 2014, and here is my proposal: > > I found this idea on the ideas page, and did some research about it. > The pack bitmap

[PATCH v3 1/2] fsck.c: Change the type of fsck_ident()'s first argument

2014-03-12 Thread Yuxuan Shui
Since fsck_ident doesn't change the content of **ident, the type of ident could be const char **. This change is required to rewrite fsck_commit() to use skip_prefix(). Signed-off-by: Yuxuan Shui --- fsck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsck.c b/f

[PATCH v3 2/2] fsck.c: Rewrite fsck_commit() to use skip_prefix()

2014-03-12 Thread Yuxuan Shui
Currently we use memcmp() in fsck_commit() to check if buffer start with a certain prefix, and skip the prefix if it does. This is exactly what skip_prefix() does. And since skip_prefix() has a self-explaintory name, this could make the code more readable. Signed-off-by: Yuxuan Shui --- fsck.c

[PATCH v3 0/2] GSoC micro project, rewrite fsck_commit() to use skip_prefix()

2014-03-12 Thread Yuxuan Shui
Improved commit message, and added a missing hunk to the second commit. Yuxuan Shui (2): fsck.c: Change the type of fsck_ident()'s first argument fsck.c: Rewrite fsck_commit() to use skip_prefix() fsck.c | 26 ++ 1 file changed, 14 insertions(+), 12 dele

Re: [PATCH v2 1/2] fsck.c: Change the type of fsck_ident()'s first argument

2014-03-12 Thread Yuxuan Shui
Hi, On Thu, Mar 13, 2014 at 4:22 AM, Jeff King wrote: > On Thu, Mar 13, 2014 at 02:51:29AM +0800, Yuxuan Shui wrote: > >> Since fsck_ident doesn't change the content of **ident, the type of >> ident could be const char **. > > Unfortunately, const double-pointers

[PATCH v2 1/2] fsck.c: Change the type of fsck_ident()'s first argument

2014-03-12 Thread Yuxuan Shui
Since fsck_ident doesn't change the content of **ident, the type of ident could be const char **. This change is required to rewrite fsck_commit() to use skip_prefix(). Signed-off-by: Yuxuan Shui --- fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck.c b/f

[PATCH v2 2/2] fsck.c: Rewrite fsck_commit() to use skip_prefix()

2014-03-12 Thread Yuxuan Shui
The purpose of skip_prefix() is much clearer than memcmp(). Also skip_prefix() takes one less argument and its return value makes more sense. Signed-off-by: Yuxuan Shui --- fsck.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/fsck.c b/fsck.c

[PATCH v2 0/2] GSoC micro project, use skip_prefix() in fsck_commit()

2014-03-12 Thread Yuxuan Shui
I'm sorry for resending these patches, but the previous ones miss the sign-offs. Yuxuan Shui (2): fsck.c: Change the type of fsck_ident()'s first argument fsck.c: Rewrite fsck_commit() to use skip_prefix() fsck.c | 26 ++ 1 file changed, 14 inserti

Re: [PATCH][GSoC] parse-options: Add OPT_SET_INT_NONEG.

2014-03-12 Thread Yuxuan Shui
; harder to make mistakes in the future when you have to declare new >> options with noneg. > > As I said elsewhere, I am not sure if doubling the number of > OPT_ macros as your micro suggestion proposes is the right > solution to the problem. > > What are we trying to

[PATCH 2/2] fsck.c: Rewrite fsck_commit() to use skip_prefix()

2014-03-12 Thread Yuxuan Shui
The purpose of skip_prefix() is much clearer than memcmp(). Also skip_prefix() takes one less argument and its return value makes more sense. --- fsck.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/fsck.c b/fsck.c index 1789c34..7e6b829 100644 ---

[PATCH 1/2] fsck.c: Change the type of fsck_ident()'s first argument

2014-03-12 Thread Yuxuan Shui
Since fsck_ident doesn't change the content of **ident, the type of ident could be const char **. This change is required to rewrite fsck_commit() to use skip_prefix(). --- fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck.c b/fsck.c index 99c0497..1789c34 100644 ---

[PATCH 0/2] GSoC micro project, use skip_prefix() in fsck_commit()

2014-03-12 Thread Yuxuan Shui
Yuxuan Shui (2): fsck.c: Change the type of fsck_ident()'s first argument fsck.c: Rewrite fsck_commit() to use skip_prefix() fsck.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) -- 1.9.0 -- To unsubscribe from this list: send the line "unsub

Re: [PATCH][GSoC] parse-options: Add OPT_SET_INT_NONEG.

2014-03-12 Thread Yuxuan Shui
ew > options with noneg. Thanks for pointing that out, I'll do as you suggested. > > On Tue, Mar 11, 2014 at 5:50 PM, Yuxuan Shui wrote: >> Reference: http://git.github.io/SoC-2014-Microprojects.html > > I think this project is actually two: one is convert current > {

GSoC proposal: port pack bitmap support to libgit2.

2014-03-12 Thread Yuxuan Shui
Hi, I'm Yuxuan Shui, a undergraduate student from China. I'm applying for GSoC 2014, and here is my proposal: I found this idea on the ideas page, and did some research about it. The pack bitmap patchset add a new .bitmap file for every pack file which contains the reachability info

[PATCH][GSoC] parse-options: Add OPT_SET_INT_NONEG.

2014-03-11 Thread Yuxuan Shui
Reference: http://git.github.io/SoC-2014-Microprojects.html Signed-off-by: Yuxuan Shui --- builtin/fetch.c| 5 ++--- builtin/merge.c| 5 ++--- builtin/notes.c| 10 -- builtin/pack-objects.c | 15 ++- builtin/update-index.c | 20