[PATCH v4 00/14] Use ALLOC_GROW() instead of inline code

2014-03-03 Thread Dmitry S. Dolzhenko
://thread.gmane.org/gmane.comp.version-control.git/242920 Dmitry S. Dolzhenko (14): builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path() bundle.c: use ALLOC_GROW() in add_to_ref_list() cache-tree.c: use ALLOC_GROW() in find_subtree() commit.c: use ALLOC_GROW() in register_commit_graft

[PATCH v4 08/14] replace_object.c: use ALLOC_GROW() in register_replace_object()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- replace_object.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) 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

[PATCH v4 10/14] dir.c: use ALLOC_GROW() in create_simplify()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- dir.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dir.c b/dir.c index 98bb50f..4ae38e4 100644 --- a/dir.c +++ b/dir.c @@ -1341,10 +1341,7 @@ static struct path_simplify *create_simplify(const char

[PATCH v4 03/14] cache-tree.c: use ALLOC_GROW() in find_subtree()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- cache-tree.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cache-tree.c b/cache-tree.c index 0bbec43..30149d1 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -75,11 +75,7 @@ static struct cache_tree_sub

[PATCH v4 11/14] attr.c: use ALLOC_GROW() in handle_attr_line()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- attr.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/attr.c b/attr.c index 8d13d70..734222d 100644 --- a/attr.c +++ b/attr.c @@ -338,12 +338,7 @@ static void handle_attr_line(struct attr_stack *res

[PATCH v4 06/14] diffcore-rename.c: use ALLOC_GROW()

2014-03-03 Thread Dmitry S. Dolzhenko
Use ALLOC_GROW() instead inline code in locate_rename_dst() and register_rename_src() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- diffcore-rename.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/diffcore-rename.c b/diffcore-rename.c index

[PATCH v4 05/14] diff.c: use ALLOC_GROW()

2014-03-03 Thread Dmitry S. Dolzhenko
Use ALLOC_GROW() instead inline code in diffstat_add() and diff_q() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- diff.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/diff.c b/diff.c index e800666..aebdfda 100644 --- a/diff.c +++ b/diff.c

[PATCH v4 02/14] bundle.c: use ALLOC_GROW() in add_to_ref_list()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- bundle.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bundle.c b/bundle.c index e99065c..1388a3e 100644 --- a/bundle.c +++ b/bundle.c @@ -14,11 +14,7 @@ static const char bundle_signature[] = # v2 git

[PATCH v4 01/14] builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- builtin/pack-objects.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c733379..0ffad6f 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack

[PATCH v4 14/14] sha1_file.c: use ALLOC_GROW() in pretend_sha1_file()

2014-03-03 Thread Dmitry S. Dolzhenko
Helped-by: He Sun sunheeh...@gmail.com Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- sha1_file.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 019628a..3cb17b8 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2624,12

[PATCH v4 04/14] commit.c: use ALLOC_GROW() in register_commit_graft()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- commit.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/commit.c b/commit.c index 6bf4fe0..e004314 100644 --- a/commit.c +++ b/commit.c @@ -147,12 +147,8 @@ int register_commit_graft(struct

[PATCH v4 13/14] read-cache.c: use ALLOC_GROW() in add_index_entry()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- read-cache.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/read-cache.c b/read-cache.c index fb440b4..cbdf954 100644 --- a/read-cache.c +++ b/read-cache.c @@ -990,11 +990,7 @@ int add_index_entry(struct

[PATCH v4 07/14] patch-ids.c: use ALLOC_GROW() in add_commit()

2014-03-03 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- patch-ids.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/patch-ids.c b/patch-ids.c index bc8a28f..bf81b92 100644 --- a/patch-ids.c +++ b/patch-ids.c @@ -83,10 +83,7 @@ static struct patch_id *add_commit

[PATCH v4 09/14] reflog-walk.c: use ALLOC_GROW()

2014-03-03 Thread Dmitry S. Dolzhenko
Use ALLOC_GROW() instead inline code in add_commit_info() and read_one_reflog() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- reflog-walk.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/reflog-walk.c b/reflog-walk.c index b2fbdb2..2899729

[PATCH v4 12/14] builtin/mktree.c: use ALLOC_GROW() in append_to_tree()

2014-03-03 Thread Dmitry S. Dolzhenko
Helped-by: He Sun sunheeh...@gmail.com Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- builtin/mktree.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/builtin/mktree.c b/builtin/mktree.c index f92ba40..a964d6b 100644 --- a/builtin/mktree.c +++ b/builtin

[PATCH v3 00/11] Use ALLOC_GROW() instead of inline code

2014-03-02 Thread Dmitry S. Dolzhenko
Dmitry S. Dolzhenko (11): builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path() bundle.c: use ALLOC_GROW() in add_to_ref_list() cache-tree.c: use ALLOC_GROW() in find_subtree() commit.c: use ALLOC_GROW() in register_commit_graft() diff.c: use ALLOC_GROW() diffcore-rename.c

[PATCH v3 01/11] builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- builtin/pack-objects.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c733379..0ffad6f 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack

[PATCH v3 02/11] bundle.c: use ALLOC_GROW() in add_to_ref_list()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- bundle.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bundle.c b/bundle.c index e99065c..1388a3e 100644 --- a/bundle.c +++ b/bundle.c @@ -14,11 +14,7 @@ static const char bundle_signature[] = # v2 git

[PATCH v3 04/11] commit.c: use ALLOC_GROW() in register_commit_graft()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- commit.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/commit.c b/commit.c index 6bf4fe0..e004314 100644 --- a/commit.c +++ b/commit.c @@ -147,12 +147,8 @@ int register_commit_graft(struct

[PATCH v3 03/11] cache-tree.c: use ALLOC_GROW() in find_subtree()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- cache-tree.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cache-tree.c b/cache-tree.c index 0bbec43..30149d1 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -75,11 +75,7 @@ static struct cache_tree_sub

[PATCH v3 05/11] diff.c: use ALLOC_GROW()

2014-03-02 Thread Dmitry S. Dolzhenko
Use ALLOC_GROW() instead inline code in diffstat_add() and diff_q() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- diff.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/diff.c b/diff.c index e800666..aebdfda 100644 --- a/diff.c +++ b/diff.c

[PATCH v3 06/11] diffcore-rename.c: use ALLOC_GROW()

2014-03-02 Thread Dmitry S. Dolzhenko
Use ALLOC_GROW() instead inline code in locate_rename_dst() and register_rename_src() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- diffcore-rename.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/diffcore-rename.c b/diffcore-rename.c index

[PATCH v3 07/11] patch-ids.c: use ALLOC_GROW() in add_commit()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- patch-ids.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/patch-ids.c b/patch-ids.c index bc8a28f..bf81b92 100644 --- a/patch-ids.c +++ b/patch-ids.c @@ -83,10 +83,7 @@ static struct patch_id *add_commit

[PATCH v3 08/11] replace_object.c: use ALLOC_GROW() in register_replace_object()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- replace_object.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) 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

[PATCH v3 09/11] reflog-walk.c: use ALLOC_GROW()

2014-03-02 Thread Dmitry S. Dolzhenko
Use ALLOC_GROW() instead inline code in add_commit_info() and read_one_reflog() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- reflog-walk.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/reflog-walk.c b/reflog-walk.c index b2fbdb2..2899729

[PATCH v3 10/11] dir.c: use ALLOC_GROW() in create_simplify()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- dir.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dir.c b/dir.c index 98bb50f..4ae38e4 100644 --- a/dir.c +++ b/dir.c @@ -1341,10 +1341,7 @@ static struct path_simplify *create_simplify(const char

[PATCH v3 11/11] attr.c: use ALLOC_GROW() in handle_attr_line()

2014-03-02 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- attr.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/attr.c b/attr.c index 8d13d70..734222d 100644 --- a/attr.c +++ b/attr.c @@ -338,12 +338,7 @@ static void handle_attr_line(struct attr_stack *res

[PATCH v2 00/11] Use ALLOC_GROW() instead of inline code

2014-02-28 Thread Dmitry S. Dolzhenko
Thank you for your remarks. In this patch I tried to take them into account. Dmitry S. Dolzhenko (11): builtin/pack-objects.c: change check_pbase_path() to use ALLOC_GROW() bundle.c: change add_to_ref_list() to use ALLOC_GROW() cache-tree.c: change find_subtree() to use ALLOC_GROW

[PATCH v2 01/11] builtin/pack-objects.c: change check_pbase_path() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- builtin/pack-objects.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c733379..56a6fc8 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack

[PATCH v2 02/11] bundle.c: change add_to_ref_list() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- bundle.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bundle.c b/bundle.c index e99065c..1388a3e 100644 --- a/bundle.c +++ b/bundle.c @@ -14,11 +14,7 @@ static const char bundle_signature[] = # v2 git

[PATCH v2 03/11] cache-tree.c: change find_subtree() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- cache-tree.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cache-tree.c b/cache-tree.c index 0bbec43..30149d1 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -75,11 +75,7 @@ static struct cache_tree_sub

[PATCH v2 04/11] commit.c: change register_commit_graft() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- commit.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/commit.c b/commit.c index 6bf4fe0..e004314 100644 --- a/commit.c +++ b/commit.c @@ -147,12 +147,8 @@ int register_commit_graft(struct

[PATCH v2 05/11] diff.c: use ALLOC_GROW() instead of inline code

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- diff.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/diff.c b/diff.c index e800666..aebdfda 100644 --- a/diff.c +++ b/diff.c @@ -1361,11 +1361,7 @@ static struct diffstat_file *diffstat_add

[PATCH v2 08/11] replace_object.c: change register_replace_object() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- replace_object.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) 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

[PATCH v2 09/11] reflog-walk.c: use ALLOC_GROW() instead of inline code

2014-02-28 Thread Dmitry S. Dolzhenko
Affected functions: read_one_reflog(), add_commit_info() Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- reflog-walk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/reflog-walk.c b/reflog-walk.c index b2fbdb2..879d2ed 100644 --- a/reflog

[PATCH v2 10/11] dir.c: change create_simplify() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- dir.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dir.c b/dir.c index 98bb50f..4ae38e4 100644 --- a/dir.c +++ b/dir.c @@ -1341,10 +1341,7 @@ static struct path_simplify *create_simplify(const char

[PATCH v2 11/11] attr.c: change handle_attr_line() to use ALLOC_GROW()

2014-02-28 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- attr.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/attr.c b/attr.c index 8d13d70..734222d 100644 --- a/attr.c +++ b/attr.c @@ -338,12 +338,7 @@ static void handle_attr_line(struct attr_stack *res

Re: [PATCH v2 00/11] Use ALLOC_GROW() instead of inline code

2014-02-28 Thread Dmitry S. Dolzhenko
Michael, On 28.02.2014 18:38, Michael Haggerty wrote: Everything looks fine to me. Assuming the test suite ran 100%, Acked-by: Michael Haggerty mhag...@alum.mit.edu All tests passed successfully for this patch, at least on my machine. Can I do something else to improve this patch? -- To

[PATCH] branch: change install_branch_config() to use skip_prefix()

2014-02-27 Thread Dmitry S. Dolzhenko
Change install_branch_config() function to use skip_prefix() for getting short name of remote branch. Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- branch.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..310749b

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

2014-02-27 Thread Dmitry S. Dolzhenko
Michael, Thank you for your remarks. If you look at what skip_prefix() and starts_with() do, I think you will find that you are doing too much work here. How about this one? const char *shortname = skip_prefix(remote, refs/heads/); int remote_is_branch = shortname != NULL; --

[PATCH v2] branch: change install_branch_config() to use skip_prefix()

2014-02-27 Thread Dmitry S. Dolzhenko
Change install_branch_config() to use skip_prefix() for getting the short name of the remote branch. Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- branch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..9382e02

[PATCH] Use ALLOC_GROW() instead of inline code

2014-02-27 Thread Dmitry S. Dolzhenko
Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@gmail.com --- attr.c | 7 +-- builtin/pack-objects.c | 7 +-- bundle.c | 6 +- cache-tree.c | 6 +- commit.c | 8 ++-- diff.c | 12

[PATCH] commit.c: use the generic sha1_pos function for lookup sha1

2014-02-26 Thread Dmitry S. Dolzhenko
Refactor binary search in commit_graft_pos function: use generic sha1_pos function. Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- commit.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/commit.c b/commit.c index 6bf4fe0..8edaeb7

[PATCH v2] commit.c: use the generic sha1_pos function for lookup

2014-02-26 Thread Dmitry S. Dolzhenko
Refactor binary search in commit_graft_pos function: use generic sha1_pos function. Signed-off-by: Dmitry S. Dolzhenko dmitrys.dolzhe...@yandex.ru --- commit.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/commit.c b/commit.c index 6bf4fe0..6ceee6a

Re: [PATCH] commit.c: use the generic sha1_pos function for lookup sha1

2014-02-26 Thread Dmitry S. Dolzhenko
Thank you for your remarks. I'll try to fix my patch and send it again. -- 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: Git in GSoC 2014

2014-02-25 Thread Dmitry S. Dolzhenko
Hi. I was just going to write an email about that I would like to participate in GSoC and contribute to Git project. I don't have wide experience in C programming, but I could be start as a janitor. I found several tasks here https://git.wiki.kernel.org/index.php/Janitor. For example