Contact me

2015-11-02 Thread Richard Sun
Hello, My name is Mr. Richard Sun from Hong Kong. I want you to be my partner in a business project. Contact me back via my private e-mail address for more details; ricadt...@ymail.com Thank you Richard Sun. -- To unsubscribe from this list: send the line "unsubscribe git" in the

loan.

2015-09-23 Thread SUN
Do you need a loan to pay off your bills, start up a business We give out loan at affordable rate of 2%. For quick response provide the below information. Name: Amount: Duration: Country: Age: Address: Mobile Number: Regards. -- To unsubscribe from this list: send the line "unsubscribe git" in t

MAIL

2014-05-30 Thread Richard Sun
Hello, My name is Mr. Richard Sun from Hong Kong. I want you to be my partner in a business project. Contact me back via my private e-mail address for more details; richadt...@ymail.com Thank you. Mr. Richard Sun. -- To unsubscribe from this list: send the line "unsubscribe git" i

[PATCH v5] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-06 Thread Sun He
s and will always be 20-byte. Helped-by: Michael Haggerty Helped-by: Duy Nguyen Helped-by: Junio C Hamano Signed-off-by: Sun He --- PATCH v5 changed the reason why should take this patch as tutored by Junio C Hamano. Thanks to Junio C Hamano again. :-) PATCH v5 move the two line behind the

[PATCH v4] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-06 Thread Sun He
/sha1.c as it is, because the function is about the SHA-1 hash algorithm whose output is and will always be 20-byte. Helped-by: Michael Haggerty Helped-by: Duy Nguyen Helped-by: Junio C Hamano Signed-off-by: Sun He --- PATCH v4 changed the reason why should take this patch as tutored by Juni

[PATCH] Setup.c: PATH_MAX is the length including the Nil

2014-03-04 Thread Sun He
Signed-off-by: Sun He --- Check the limit.h of linux and find out that the MACRO #define PATH_MAX4096/* # chars in a path name including nul */ So if the magic number 40 is just the size it should be. (e.g. hash code) It may bring bugs with the length(4056) of long name(gitdirenv

Re: [PATCH] Use ALLOC_GROW() instead of inline code

2014-03-03 Thread He Sun
lifo->alloc * sizeof(struct commit_info)); > - } > + > + ALLOC_GROW(lifo->items, lifo->nr + 1, lifo->alloc); > info = lifo->items + lifo->nr; > info->commit = commit; > info->util = util; > diff --git a/replace_object.c b/replace_object.c > index cdcaf8c..843deef 100644 > --- a/replace_object.c > +++ b/replace_object.c > @@ -36,12 +36,8 @@ static int register_replace_object(struct replace_object > *replace, > return 1; > } > pos = -pos - 1; > - if (replace_object_alloc <= ++replace_object_nr) { > - replace_object_alloc = alloc_nr(replace_object_alloc); > - replace_object = xrealloc(replace_object, > - sizeof(*replace_object) * > - replace_object_alloc); > - } > + ALLOC_GROW(replace_object, replace_object_nr + 1, > replace_object_alloc); > + replace_object_nr++; > if (pos < replace_object_nr) > memmove(replace_object + pos + 1, > replace_object + pos, > -- > 1.8.3.2 > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Cheers, He Sun -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v3] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-03 Thread Sun He
Replacing memcpy with hashcpy is more directly and elegant. Leave ppc/sha1.c alone, as it is an isolated component. Pull cache.h(actually ../cache.h) in just for one memcpy there is not proper. Helped-by: Michael Haggerty Helped-by: Duy Nguyen Signed-off-by: Sun He --- PATCH v3 delete the

Re: [PATCH v2] finish_tmp_packfile():use strbuf for pathname construction

2014-03-03 Thread He Sun
2014-03-03 15:41 GMT+08:00 Eric Sunshine : > On Sat, Mar 1, 2014 at 9:29 PM, Sun He wrote: >> Signed-off-by: Sun He >> Helped-by: Eric Sunshine >> Helped-by: Michael Haggerty >> --- >> >> This patch has assumed that you have already fi

[PATCH v3] finish_tmp_packfile():use strbuf for pathname construction

2014-03-03 Thread Sun He
The old version fixes a maximum length on the buffer, which could be a problem if one is not certain of the length of get_object_directory(). Using strbuf can avoid the protential bug. Helped-by: Michael Haggerty Helped-by: Eric Sunshine Signed-off-by: Sun He --- PATCH v3 adds the reason why

Re: [PATCH v3] branch.c: change install_branch_config() to use skip_prefix()

2014-03-02 Thread He Sun
2014-03-03 10:24 GMT+08:00 Guanglin Xu : > to avoid a magic code of 11. > > Helped-by: Eric Sunshine > Helped-by: Jacopo Notarstefano > Signed-off-by: Guanglin Xu > --- > > This is an implementation of the idea#2 of GSoC 2014 microproject. > > branch.c | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH v3] branch.c: change install_branch_config() to use skip_prefix()

2014-03-02 Thread He Sun
1.9.0 > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Cheers, He Sun -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3] write_pack_file: use correct variable in diagnostic

2014-03-02 Thread He Sun
2014-03-03 2:42 GMT+08:00 Eric Sunshine : > On Sun, Mar 2, 2014 at 2:30 AM, Sun He wrote: >> 'pack_tmp_name' is the subject of the utime() check, so report it in the >> warning, not the uninitialized 'tmpname' >> >> Signed-off-by: Sun He >

[PATCH v2] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-02 Thread Sun He
Replacing memcpy with hashcpy is more directly and elegant. Leave ppc/sha1.c alone, as it is an isolated component. Pull cache.h(actually ../cache.h) in just for one memcpy there is not proper. Helped-by: Michael Haggerty Helped-by: Duy Nguyen Signed-off-by: Sun He --- PATCH v2 leave

[PATCH v3] Place cache.h at the first place to match general rule

2014-03-02 Thread Sun He
The general rule is if cache.h or git-compat-util.h is included, it is the first #include. As builtin.h starts with git-compat-util.h, files that start with builtin.h are not changed. Helped-by: Duy Nguyen Helped-by: Eric Sunshine Signed-off-by: Sun He --- "PATCH v3" fix the p

Re: [PATCH v2] Place cache.h at the first place to match general rule

2014-03-02 Thread He Sun
2014-03-02 12:34 GMT+08:00 Eric Sunshine : > On Sat, Mar 1, 2014 at 9:18 PM, Sun He wrote: >> Signed-off-by: Sun He >> Helped-by: Duy Nguyen > > Footers should follow a temporal order. For instance: > > 1. Duy helped you. > 2. You revised your patch based upon

[PATCH v3] write_pack_file: use correct variable in diagnostic

2014-03-01 Thread Sun He
'pack_tmp_name' is the subject of the utime() check, so report it in the warning, not the uninitialized 'tmpname' Signed-off-by: Sun He --- Changing the subject and adding valid information as tutored by Eric Sunshine. Thanks to him. builtin/pack-objects.c | 2 +

Re: [PATCH v2] Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name.

2014-03-01 Thread He Sun
2014-03-02 11:59 GMT+08:00 Eric Sunshine : > On Sat, Mar 1, 2014 at 9:43 PM, Sun He wrote: >> Subject: Replace tmpname with pack_tmp_name in warning. The developer >> mistook tmpname for pack_tmp_name. > > The subject should be a short summary of the change, and the rest of

[PATCH v2] Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name.

2014-03-01 Thread Sun He
Signed-off-by: Sun He --- As tmpname is used without initialization, it should be a mistake. builtin/pack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c733379..4922ce5 100644 --- a/builtin/pack-objects.c

[PATCH v2] finish_tmp_packfile():use strbuf for pathname construction

2014-03-01 Thread Sun He
Signed-off-by: Sun He Helped-by: Eric Sunshine Helped-by: Michael Haggerty --- This patch has assumed that you have already fix the bug of tmpname in builtin/pack-objects.c:write_pack_file() warning() builtin/pack-objects.c | 15 ++- bulk-checkin.c | 8 +--- pack

[PATCH v2] Place cache.h at the first place to match general rule

2014-03-01 Thread Sun He
Signed-off-by: Sun He Helped-by: Duy Nguyen --- "PATCH v2" Fix the spelling bug of general in subject as is suggested by brain m.calson The general rule is if cache.h or git-compat-util.h is included, it is the first #include. I parsed all the source files, and find many f

[PATCH] Place cache.h at the first place to match generl rule

2014-03-01 Thread Sun He
Signed-off-by: Sun He Helped-by: Duy Nguyen --- The general rule is if cache.h or git-compat-util.h is included, it is the first #include. I parsed all the source files, and find many files start with builtin.h. And git-compat-util.h is the first in it. So they don't need any c

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread He Sun
Got it. Thanks. 2014-03-01 17:13 GMT+08:00 Tay Ray Chuan : > On Sat, Mar 1, 2014 at 10:58 AM, Duy Nguyen wrote: >> On Sat, Mar 1, 2014 at 8:07 AM, Sun He wrote: >>> Signed-off-by: Sun He >>> --- >>> Find the potential places with memcpy by the bash c

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread He Sun
2014-03-01 10:58 GMT+08:00 Duy Nguyen : > On Sat, Mar 1, 2014 at 8:07 AM, Sun He wrote: >> Signed-off-by: Sun He >> --- >> Find the potential places with memcpy by the bash command: >>$ find . | xargs grep "memcpy.*\(.*20.*\)" >> >> Helped-

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread He Sun
2014-03-01 10:58 GMT+08:00 Duy Nguyen : > On Sat, Mar 1, 2014 at 8:07 AM, Sun He wrote: >> Signed-off-by: Sun He >> --- >> Find the potential places with memcpy by the bash command: >>$ find . | xargs grep "memcpy.*\(.*20.*\)" >> >> Helped-

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread He Sun
2014-03-01 19:21 GMT+08:00 Faiz Kothari : > Signed-off-by: Faiz Kothari > --- > Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places > to substitute write_or_die(). I spotted other places where strbuf can be used > in place of buf[MAX_PATH] but that would require a change i

Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

2014-03-01 Thread He Sun
ated to bitmap, because the input packname is different from the output packname.. Cheers, He Sun > Anyways, no worries :) > > Cheers, > Faiz > > On Sat, Mar 1, 2014 at 12:40 PM, He Sun wrote: >> 2014-03-01 14:46 GMT+08:00 Faiz Kothari : >>> From: Faiz Kotahri &g

Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

2014-02-28 Thread He Sun
2014-03-01 14:46 GMT+08:00 Faiz Kothari : > From: Faiz Kotahri > > Signed-off-by: Faiz Kothari > --- > Sticking with implementation involving changing the prototype for > pack-write.c:finish_tmp_packfile() > Fixing a small bug in Sun He's implementation which caus

Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

2014-02-28 Thread He Sun
2014-03-01 14:46 GMT+08:00 Faiz Kothari : > From: Faiz Kotahri > > Signed-off-by: Faiz Kothari > --- > Sticking with implementation involving changing the prototype for > pack-write.c:finish_tmp_packfile() > Fixing a small bug in Sun He's implementation which caus

Re: [PATCH] rewrite bulk-checkin.c:finish_bulk_checkin() using strbuf

2014-02-28 Thread He Sun
2014-03-01 2:27 GMT+08:00 Faiz Kothari : > Hi, > Thanks for the suggestions and remarks. > I rewrote bulk-checkin.c:finish_bulk_checkin() using strbuf. But saw > that Sun He has already implemented the same way I have done. > Should I submit my implementation as a patch? > >

[PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- Find the potential places with memcpy by the bash command: $ find . | xargs grep "memcpy.*\(.*20.*\)" Helped-by: Michael Haggerty bundle.c| 2 +- grep.c | 2 +- pack-bitmap-write.c | 2 +- ppc/sha1.c | 3 ++- ref

Re: [PATCH] Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

2014-02-28 Thread He Sun
2014-03-01 4:42 GMT+08:00 Eric Sunshine : > On Fri, Feb 28, 2014 at 9:17 AM, 孙赫 wrote: >> 2014-02-28 21:12 GMT+08:00 Eric Sunshine [via git] >> : >>> On Fri, Feb 28, 2014 at 4:46 AM, Eric Sunshine <[hidden email]> wrote: >>> >>>> On Fri, Feb

Re: [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE

2014-02-28 Thread He Sun
2014-03-01 4:02 GMT+08:00 Junio C Hamano [via git] : > Duy Nguyen <[hidden email]> writes: > >> Way too long subject line. Keep it within 70-75 chars. The rest could >> be put in the body. >> >> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <[hidden email]> wrote: >>> I am not sure if this is a bug. >>> I ne

Re: [PATCH] parse-options.c:parse_options_check() change OPTION_NUMBER to OPTION_CMDMODE

2014-02-28 Thread He Sun
2014-03-01 3:42 GMT+08:00 Junio C Hamano : > Michael Haggerty writes: > >> On 02/28/2014 10:07 AM, Sun He wrote: >>> Signed-off-by: Sun He >>> --- >>> parse-options.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >

[PATCH] finish_tmp_packfile():use strbuf for pathname construction

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- I follow the suggestions of Eric Sunshine to fix the patch. Of cause this patch has assumed that you have already fix the bug of tmpname in builtin/pack-objects.c:write_pack_file() warning() I want to say thank you to Eric Sunshine and Michael Haggerty who give me lots

[PATCH] builtin/pack-objects.c:write_pack_file() replace tmpname with pack_tmp_name in warning

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- The tmpname is uninitialized and it should a bug Please ignore the former patches about this with wrong format. I am sorry to cause a jam in your inbox. ^_^ In the end, I wanna thank Michael Haggerty who give me help. builtin/pack-objects.c | 2 +- 1 file changed, 1

[PATCH] builtin/pack-objects.c:write_pack_file() replace tmpname with pack_tmp_name in warning

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- builtin/pack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c733379..4922ce5 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -823,7 +823,7 @@ static void

[PATCH] OPTION_NUMBER should be replaced by OPTION_CMDMODE

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- parse-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse-options.c b/parse-options.c index 7b8d3fa..59a52b0 100644 --- a/parse-options.c +++ b/parse-options.c @@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts

[PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- parse-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse-options.c b/parse-options.c index 7b8d3fa..59a52b0 100644 --- a/parse-options.c +++ b/parse-options.c @@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts

[PATCH] parse-options.c:parse_options_check() change OPTION_NUMBER to OPTION_CMDMODE

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- parse-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse-options.c b/parse-options.c index 7b8d3fa..59a52b0 100644 --- a/parse-options.c +++ b/parse-options.c @@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts

[PATCH] Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

2014-02-28 Thread Sun He
Signed-off-by: Sun He --- builtin/pack-objects.c | 17 +++-- bulk-checkin.c | 8 +--- pack-write.c | 20 pack.h | 2 +- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack

[PATCH] GSoC2014 microprojects #6 Change bundle.c:add_to_ref_list() to use ALLOC_GROW()

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bundle.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/bundle.c b/bundle.c index 7809fbb..1a7b7eb 100644 --- a/bundle.c +++ b/bundle.c @@ -14,11 +14,7 @@ static const char bundle_signature[] = "# v2 git bundle\n"; s

[PATCH] GSoC2014 microprojects #5 Change bundle.c:add_to_ref_list() to use hashcpy()

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bundle.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bundle.c b/bundle.c index e99065c..7809fbb 100644 --- a/bundle.c +++ b/bundle.c @@ -19,7 +19,7 @@ static void add_to_ref_list(const unsigned char *sha1, const char *name

[PATCH] GSoC2014 microprojects Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bulk-checkin.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 118c625..e3c7fb2 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -23,7 +23,8 @@ static struct bulk_checkin_state { static void

[PATCH] Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bulk-checkin.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 118c625..8c47d71 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -23,7 +23,8 @@ static struct bulk_checkin_state { static void

[PATCH] Change branch.c:install_branch_config()

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- branch.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..2fe9c05 100644 --- a/branch.c +++ b/branch.c @@ -50,7 +50,7 @@ static int should_setup_rebase(const char *origin) void install_branch_config(int flag

[PATCH] Rewrite git-compat-util.h:skip_prefix() as a loop

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- git-compat-util.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index cbd86c3..4daa6cf 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -357,8 +357,8 @@ extern int suffixcmp(const char *str