[Patch v2] t2027: avoid using pipes

2017-03-10 Thread Prathamesh Chavan
From: Prathamesh Whenever a git command is present in the upstream of a pipe, its failure gets masked by piping and hence it should be avoided for testing the upstream git command. By writing out the output of the git command to a file, we can test the exit codes of both the commands as a failure

Re: [PATCH v2] t2027: avoid using pipes

2017-03-10 Thread Prathamesh Chavan
On Thu, Mar 9, 2017 at 6:00 PM, Christian Couder wrote: > On Thu, Mar 9, 2017 at 10:53 AM, Prathamesh Chavan wrote: >> Whenever a git command is present in the upstream of a pipe, its failure >> gets masked by piping and hence it should be avoided for testing the >> ups

GSoC Project | Submodules related work

2017-03-15 Thread Prathamesh Chavan
Hey everyone, I am Prathamesh. I am studying Computer Science and Engineering at IIT Kharagpur. I am interested to participate in Google Summer of Code 2017 under Git organization. I attempted "Avoid pipes in git related commands for test suite" as my microproject[1]. As a part of GSoC, I would l

[GSoC][PATCH v4] t2027: avoid using pipes

2017-03-24 Thread Prathamesh Chavan
exit code in any command will stop the && chain. Signed-off-by: Prathamesh Chavan --- Hi, I am Prathamesh Chavan. This is my microproject which I have attempted for Google Summer of Code for 2017. Also in this new version of patch I have changed sendemail.name configuration of the .gitcon

[GSoC][PATCH v4] t2027: avoid using pipes

2017-03-24 Thread Prathamesh Chavan
command is able to stop the && chain. Signed-off-by: Prathamesh Chavan --- Hi, I am Prathamesh Chavan. This is my microproject which I have attempted for Google Summer of Code for 2017. Also in this new version of patch I have changed sendemail.name configuration of the .gitconfig file

[RFC] [GSoC] Proposal Draft for GSoC 2017 : Incremental Rewrite of git-submodules

2017-04-01 Thread Prathamesh Chavan
would be great to have your suggestion, so that I can improve it futher. Thanks, Prathamesh Chavan --- Incremental Rewrite of git-submodules 01.04.2017 About Me Name Prathamesh Chavan UniversityIndian Institute of Technology, Kharagpur Major Computer Science and

[GSoC][PATCH v5] t2027: avoid using pipes

2017-04-03 Thread Prathamesh Chavan
command is able to stop the && chain. Signed-off-by: Prathamesh Chavan --- In this new version of the patch, I resolved the grammar mistakes from the commit message. Thanks for pointing it out. t/t2027-worktree-list.sh | 35 +-- 1 file changed, 21 insertion

[GSoC][PATCH v1] Disallow git commands from within unpopulated submodules

2017-04-05 Thread Prathamesh Chavan
sub/ directory to the submodule or superproject. Hence we’ll prefer to error out in these case. Eventually, we use a check_prefix_inside_submodule to see check if the path is inside an unpopulated submodule. If it is, then we report the user about the unpopulated submodule. Signed-off-by: Prath

[GSoC][PATCH v1] Disallow git commands from within unpopulated submodules

2017-04-05 Thread Prathamesh Chavan
sub/ directory to the submodule or superproject. Hence we’ll prefer to error out in these case. Eventually, we use a check_prefix_inside_submodule to see check if the path is inside an unpopulated submodule. If it is, then we report the user about the unpopulated submodule. Signed-off-by: Prath

Re: [GSoC][PATCH v1] Disallow git commands from within unpopulated submodules

2017-04-06 Thread Prathamesh Chavan
7;ll take will be as follows: 1. Create function check_prefix_inside_submodule which returns value accordingly. Also this function is implemented by checking the active_cache list and checking if it prefix is present in active_cache[i]->name, using binary search. Also is there some other way which is more quicker than searching for the prefix in the cache? 2. Individually call this in each command after the git environment is set and options are parsed. 3. Apply this change for appropriate options only, as suggested above for the status command. This will ensure more accuracy. I have also mentioned to work on this BUG in my git proposal as well, but I kept it in my wishlist section. Hence, I'll continue to work on this as my time permits. Currently, I'm also working on converting the git-submodule subcommand 'foreach' from script to builtin, by first converting it to a function in submodule--helper.c and then later converting it to builtin. Thanks, Prathamesh Chavan

[GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath()

2017-07-18 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6abdad329..7af4de09b 100644 --- a/builtin/submodule

[GSoC][PATCH 0/8] Update: Week 9

2017-07-18 Thread Prathamesh Chavan
nbox.org/git/20170713200538.25806-4-pc44...@gmail.com/ [3]: https://public-inbox.org/git/20170713200538.25806-5-pc44...@gmail.com/ [4]: https://public-inbox.org/git/20170603003710.5558-1-sbel...@google.com/ Prathamesh Chavan (8): submodule--helper: introduce get_submodule_displaypath() submodu

[GSoC][PATCH 2/8] submodule--helper: introduce for_each_submodule_list()

2017-07-18 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH 3/8] submodule: port set_name_rev() from shell to C

2017-07-18 Thread Prathamesh Chavan
Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 63 + git-submodule.sh| 16 ++-- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin

[GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-18 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

[GSoC][PATCH 7/8] diff: change scope of the function count_lines()

2017-07-18 Thread Prathamesh Chavan
Change the scope of function count_lines for allowing the function to be reused in other parts of the code as well. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- diff.c | 2 +- diff.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[GSoC][PATCH 5/8] submodule: port submodule subcommand 'sync' from shell to C

2017-07-18 Thread Prathamesh Chavan
print_default_remote(). The function print_default_remote() is introduced for getting the default remote as stdout. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 179 ++

[GSoC][PATCH 6/8] submodule: port submodule subcommand 'deinit' from shell to C

2017-07-18 Thread Prathamesh Chavan
: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 143 git-submodule.sh| 55 + 2 files changed, 144 insertions(+), 54 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin

[GSoC][PATCH 8/8] submodule: port submodule subcommand 'summary' from shell to C

2017-07-18 Thread Prathamesh Chavan
alling the print_submodule_summary() function. Finally, the print_submodule_summary() takes care of generating and printing the summary for each submodule. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version of patch, instead of adding the GIT_

Re: [GSoC][PATCH 5/8] submodule: port submodule subcommand 'sync' from shell to C

2017-07-20 Thread Prathamesh Chavan
die(_("failed to update remote for submodule '%s'"), >> + list_item->name); > > While it is a strict conversion from the shell script, we could also > try to do this in-process: > 1) we'd find out the submodules git dir using submodule_to_gitdir > 2) construct the path the the config file as "%s/.gitconfig" > 3) using git_config_set_in_file (which presumably takes file name, > key and value) the value can be set Thanks for pointing that out. That surely reduced a child_process. Although the path of the config file for the case of submodules would be constructed by "%s/config". Thanks, Prathamesh Chavan

[GSoC][PATCH 00/13] Update: Week 10

2017-07-24 Thread Prathamesh Chavan
i.org/pratham-pc/git/builds/ [4]: https://github.com/pratham-pc/git/commits/week-10 Prathamesh Chavan (13): submodule--helper: introduce get_submodule_displaypath() submodule--helper: introduce for_each_submodule_list() submodule: port set_name_rev() from shell to C submodule: port submod

[GSoC][PATCH 04/13] submodule: port submodule subcommand 'status' from shell to C

2017-07-24 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

[GSoC][PATCH 01/13] submodule--helper: introduce get_submodule_displaypath()

2017-07-24 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6abdad329..7af4de09b 100644 --- a/builtin/submodule

[GSoC][PATCH 03/13] submodule: port set_name_rev() from shell to C

2017-07-24 Thread Prathamesh Chavan
Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 63 + git-submodule.sh| 16 ++-- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin

[GSoC][PATCH 02/13] submodule--helper: introduce for_each_submodule_list()

2017-07-24 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH 05/13] submodule: port submodule subcommand 'sync' from shell to C

2017-07-24 Thread Prathamesh Chavan
print_default_remote(). The function print_default_remote() is introduced for getting the default remote as stdout. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version of patch, following changes were made: * the code use to die whe

[GSoC][PATCH 06/13] submodule: port submodule subcommand 'deinit' from shell to C

2017-07-24 Thread Prathamesh Chavan
: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 141 git-submodule.sh| 55 + 2 files changed, 142 insertions(+), 54 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin

[GSoC][PATCH 07/13] diff: change scope of the function count_lines()

2017-07-24 Thread Prathamesh Chavan
Change the scope of function count_lines for allowing the function to be reused in other parts of the code as well. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- diff.c | 2 +- diff.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[GSoC][PATCH 09/13] submodule foreach: correct '$path' in nested submodules from a subdirectory

2017-07-24 Thread Prathamesh Chavan
task. With a human on the keyboard the feedback loop is short and the changed behavior can be adapted to quickly unlike some automation that can break silently. Discussed-with: Ramsay Jones Signed-off-by: Prathamesh Chavan Signed-off-by: Stefan Beller --- git-submodule.sh | 1 -

[GSoC][PATCH 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-07-24 Thread Prathamesh Chavan
alling the print_submodule_summary() function. Finally, the print_submodule_summary() takes care of generating and printing the summary for each submodule. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version of patch, following changes were made:

[GSoC][PATCH 12/13] submodule foreach: document variable '$displaypath'

2017-07-24 Thread Prathamesh Chavan
It was observer that the variable '$displaypath' was accessible but undocumented. Hence, document it. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git-submodule.txt | 6 -- t/t7407-submodule-foreach.

[GSoC][PATCH 13/13] submodule: port submodule subcommand 'foreach' from shell to C

2017-07-24 Thread Prathamesh Chavan
tored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 129 git-submodule.sh| 39 +- 2 files changed, 130 insertions(+), 38 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/su

[GSoC][PATCH 11/13] submodule foreach: clarify the '$toplevel' variable documentation

2017-07-24 Thread Prathamesh Chavan
It does not contain the topmost superproject as the author assumed, but the direct superproject, such that $toplevel/$sm_path is the actual absolute path of the submodule. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git

[GSoC][PATCH 10/13] submodule foreach: document '$sm_path' instead of '$path'

2017-07-24 Thread Prathamesh Chavan
make the 'path' variable available and document it as a deprecated synonym of 'sm_path'. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git-submodule.txt | 10 ++ 1 file changed, 6 insertions(+), 4 deletions

[GSoC][PATCH v2 03/13] submodule: port set_name_rev() from shell to C

2017-07-29 Thread Prathamesh Chavan
Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * The variable namerev from print_name_rev is now freed at the end of the function. builtin/submodule--helper.c | 64 + git

[GSoC][PATCH v2 00/13] Update: Week 10

2017-07-29 Thread Prathamesh Chavan
plete build report of this work is available at: [1] Branch: week-10 Build #142 Also, I have push the work on github as well and can be checked out at: [2] [1]: https://travis-ci.org/pratham-pc/git/builds [2]: https://github.com/pratham-pc/git/commits/week-10 Prathamesh Chavan (13): submodule--h

[GSoC][PATCH v2 07/13] diff: change scope of the function count_lines()

2017-07-29 Thread Prathamesh Chavan
Change the scope of function count_lines for allowing the function to be reused in other parts of the code as well. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- diff.c | 2 +- diff.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[GSoC][PATCH v2 05/13] submodule: port submodule subcommand 'sync' from shell to C

2017-07-29 Thread Prathamesh Chavan
print_default_remote(). The function print_default_remote() is introduced for getting the default remote as stdout. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * There was no good reas

[GSoC][PATCH v2 04/13] submodule: port submodule subcommand 'status' from shell to C

2017-07-29 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

[GSoC][PATCH v2 01/13] submodule--helper: introduce get_submodule_displaypath()

2017-07-29 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6abdad329..7af4de09b 100644 --- a/builtin/submodule

[GSoC][PATCH v2 06/13] submodule: port submodule subcommand 'deinit' from shell to C

2017-07-29 Thread Prathamesh Chavan
: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * In the function deinit_submodule, since the test is_git_directory() adds an additional condition, instead is_directory() is used to check if "sm_path/.git" is a directory

[GSoC][PATCH v2 02/13] submodule--helper: introduce for_each_submodule_list()

2017-07-29 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH v2 10/13] submodule foreach: document '$sm_path' instead of '$path'

2017-07-29 Thread Prathamesh Chavan
make the 'path' variable available and document it as a deprecated synonym of 'sm_path'. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- This patch is same as its previous version. Although here I'll like to add a point that

[GSoC][PATCH v2 11/13] submodule foreach: clarify the '$toplevel' variable documentation

2017-07-29 Thread Prathamesh Chavan
It does not contain the topmost superproject as the author assumed, but the direct superproject, such that $toplevel/$sm_path is the actual absolute path of the submodule. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git

[GSoC][PATCH v2 09/13] submodule foreach: correct '$path' in nested submodules from a subdirectory

2017-07-29 Thread Prathamesh Chavan
task. With a human on the keyboard the feedback loop is short and the changed behavior can be adapted to quickly unlike some automation that can break silently. Discussed-with: Ramsay Jones Signed-off-by: Prathamesh Chavan Signed-off-by: Stefan Beller --- git-submodule.sh | 1 -

[GSoC][PATCH v2 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-07-29 Thread Prathamesh Chavan
alling the print_submodule_summary() function. Finally, the print_submodule_summary() takes care of generating and printing the summary for each submodule. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have

[GSoC][PATCH v2 12/13] submodule foreach: document variable '$displaypath'

2017-07-29 Thread Prathamesh Chavan
It was observed that the variable '$displaypath' was accessible but undocumented. Hence, document it. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * Spelling mistake in

[GSoC][PATCH v2 13/13] submodule: port submodule subcommand 'foreach' from shell to C

2017-07-29 Thread Prathamesh Chavan
tored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * Comment style is improved in the function runcommand_in_submodule() * Comment in added about why the variable "path" was exposed via args argv_array instead of expos

Re: [GSoC][PATCH v2 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-07-29 Thread Prathamesh Chavan
On Sun, Jul 30, 2017 at 10:58 AM, Christian Couder wrote: > On Sun, Jul 30, 2017 at 12:23 AM, Prathamesh Chavan wrote: > >> +static int module_summary(int argc, const char **argv, const char *prefix) >> +{ >> + struct summary_cb info = SUMMARY_CB_INIT; &

[GSoC][PATCH 00/13] Update: Week-11

2017-07-31 Thread Prathamesh Chavan
SUMMARY OF MY PROJECT: Git submodule subcommands are currently implemented by using shell script 'git-submodule.sh'. There are several reasons why we'll prefer not to use the shell script. My project intends to convert the subcommands into C code, thus making them builtins. This will increase Git'

[GSoC][PATCH 01/13] submodule--helper: introduce get_submodule_displaypath()

2017-07-31 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6abdad329..7af4de09b 100644 --- a/builtin/submodule

[GSoC][PATCH 02/13] submodule--helper: introduce for_each_submodule_list()

2017-07-31 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH 04/13] submodule: port submodule subcommand 'status' from shell to C

2017-07-31 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

[GSoC][PATCH 03/13] submodule: port set_name_rev() from shell to C

2017-07-31 Thread Prathamesh Chavan
Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * The variable namerev from print_name_rev is now freed at the end of the function. builtin/submodule--helper.c | 64 + git

[GSoC][PATCH 09/13] submodule foreach: correct '$path' in nested submodules from a subdirectory

2017-07-31 Thread Prathamesh Chavan
task. With a human on the keyboard the feedback loop is short and the changed behavior can be adapted to quickly unlike some automation that can break silently. Discussed-with: Ramsay Jones Signed-off-by: Prathamesh Chavan Signed-off-by: Stefan Beller --- git-submodule.sh | 1 -

[GSoC][PATCH 13/13] submodule: port submodule subcommand 'foreach' from shell to C

2017-07-31 Thread Prathamesh Chavan
tored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * Comment style is improved in the function runcommand_in_submodule() * Comment in added about why the variable "path" was exposed via args argv_array instead of expos

[GSoC][PATCH 10/13] submodule foreach: document '$sm_path' instead of '$path'

2017-07-31 Thread Prathamesh Chavan
make the 'path' variable available and document it as a deprecated synonym of 'sm_path'. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- This patch is same as its previous version. Although here I'll like to add a point that

[GSoC][PATCH 12/13] submodule foreach: document variable '$displaypath'

2017-07-31 Thread Prathamesh Chavan
It was observed that the variable '$displaypath' was accessible but undocumented. Hence, document it. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * Spelling mistake in

[GSoC][PATCH 07/13] diff: change scope of the function count_lines()

2017-07-31 Thread Prathamesh Chavan
Change the scope of function count_lines for allowing the function to be reused in other parts of the code as well. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- diff.c | 2 +- diff.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[GSoC][PATCH 06/13] submodule: port submodule subcommand 'deinit' from shell to C

2017-07-31 Thread Prathamesh Chavan
: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * In the function deinit_submodule, since the test is_git_directory() adds an additional condition, instead is_directory() is used to check if "sm_path/.git" is a directory

[GSoC][PATCH 11/13] submodule foreach: clarify the '$toplevel' variable documentation

2017-07-31 Thread Prathamesh Chavan
It does not contain the topmost superproject as the author assumed, but the direct superproject, such that $toplevel/$sm_path is the actual absolute path of the submodule. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git

[GSoC][PATCH 05/13] submodule: port submodule subcommand 'sync' from shell to C

2017-07-31 Thread Prathamesh Chavan
print_default_remote(). The function print_default_remote() is introduced for getting the default remote as stdout. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * There was no good reas

[GSoC][PATCH 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-07-31 Thread Prathamesh Chavan
alling the print_submodule_summary() function. Finally, the print_submodule_summary() takes care of generating and printing the summary for each submodule. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have

Re: [GSoC][PATCH 04/13] submodule: port submodule subcommand 'status' from shell to C

2017-08-01 Thread Prathamesh Chavan
On Tue, Aug 1, 2017 at 2:42 AM, Stefan Beller wrote: > On Mon, Jul 31, 2017 at 1:56 PM, Prathamesh Chavan wrote: >> This aims to make git-submodule 'status' a built-in. Hence, the function >> cmd_status() is ported from shell to C. This is done by introducing >>

Re: [GSoC][PATCH 06/13] submodule: port submodule subcommand 'deinit' from shell to C

2017-08-01 Thread Prathamesh Chavan
On Tue, Aug 1, 2017 at 3:12 AM, Stefan Beller wrote: > On Mon, Jul 31, 2017 at 1:56 PM, Prathamesh Chavan wrote: >> The same mechanism is used even for porting this submodule >> subcommand, as used in the ported subcommands till now. >> The function cmd_deinit in split

Re: [GSoC][PATCH 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-08-05 Thread Prathamesh Chavan
On Tue, Aug 1, 2017 at 4:57 AM, Christian Couder wrote: > On Mon, Jul 31, 2017 at 10:56 PM, Prathamesh Chavan wrote: > >> * variable head was no longer used in module_summary() and instead the strbuf >> was utilized. > > Good but there might be a few problems in the w

Re: [GSoC][PATCH 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-08-05 Thread Prathamesh Chavan
On Sat, Aug 5, 2017 at 10:25 PM, Christian Couder wrote: > On Sat, Aug 5, 2017 at 12:28 PM, Prathamesh Chavan wrote: >> On Tue, Aug 1, 2017 at 4:57 AM, Christian Couder >> wrote: >>> On Mon, Jul 31, 2017 at 10:56 PM, Prathamesh Chavan >>> wrote: >>

[GSoC][PATCH 02/13] submodule--helper: introduce for_each_submodule_list()

2017-08-07 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH 03/13] submodule: port set_name_rev() from shell to C

2017-08-07 Thread Prathamesh Chavan
Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 63 + git-submodule.sh| 16 ++-- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin

[GSoC][PATCH 01/13] submodule--helper: introduce get_submodule_displaypath()

2017-08-07 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6abdad329..7af4de09b 100644 --- a/builtin/submodule

[GSoC][PATCH 00/13] Update: Week-12

2017-08-07 Thread Prathamesh Chavan
inbox.org/git/CAGZ79kbyyR54me_+wQDZRrikqKTp_a98yozVfr8P85QHfyyy=q...@mail.gmail.com/ [5]: https://travis-ci.org/pratham-pc/git/builds/ [6]: https://github.com/pratham-pc/git/commits/week-12 Prathamesh Chavan (13): submodule--helper: introduce get_submodule_displaypath() submodule--helper: introduce for_each_subm

[GSoC][PATCH 04/13] submodule: port submodule subcommand 'status' from shell to C

2017-08-07 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

[GSoC][PATCH 05/13] submodule: port submodule subcommand 'sync' from shell to C

2017-08-07 Thread Prathamesh Chavan
print_default_remote(). The function print_default_remote() is introduced for getting the default remote as stdout. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 183 ++

[GSoC][PATCH 06/13] submodule: port submodule subcommand 'deinit' from shell to C

2017-08-07 Thread Prathamesh Chavan
: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 148 git-submodule.sh| 55 +--- 2 files changed, 149 insertions(+), 54 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule

[GSoC][PATCH 07/13] diff: change scope of the function count_lines()

2017-08-07 Thread Prathamesh Chavan
Change the scope of function count_lines for allowing the function to be reused in other parts of the code as well. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- diff.c | 2 +- diff.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[GSoC][PATCH 08/13] submodule: port submodule subcommand 'summary' from shell to C

2017-08-07 Thread Prathamesh Chavan
eventually calling the generate_submodule_summary() function. The function generate_submodule_summary() takes care of generating the summary for each submodule and then calls the function print_summary() for printing it. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Pratham

[GSoC][PATCH 10/13] submodule foreach: document '$sm_path' instead of '$path'

2017-08-07 Thread Prathamesh Chavan
make the 'path' variable available and document it as a deprecated synonym of 'sm_path'. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git-submodule.txt | 10 ++ 1 file changed, 6 insertions(+), 4 deletions

[GSoC][PATCH 11/13] submodule foreach: clarify the '$toplevel' variable documentation

2017-08-07 Thread Prathamesh Chavan
It does not contain the topmost superproject as the author assumed, but the direct superproject, such that $toplevel/$sm_path is the actual absolute path of the submodule. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git

[GSoC][PATCH 09/13] submodule foreach: correct '$path' in nested submodules from a subdirectory

2017-08-07 Thread Prathamesh Chavan
task. With a human on the keyboard the feedback loop is short and the changed behavior can be adapted to quickly unlike some automation that can break silently. Discussed-with: Ramsay Jones Signed-off-by: Prathamesh Chavan Signed-off-by: Stefan Beller --- git-submodule.sh | 1 -

[GSoC][PATCH 12/13] submodule foreach: document variable '$displaypath'

2017-08-07 Thread Prathamesh Chavan
It was observed that the variable '$displaypath' was accessible but undocumented. Hence, document it. Discussed-with: Ramsay Jones Signed-off-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- Documentation/git-submodule.txt | 6 -- t/t7407-submodule-foreach.

[GSoC][PATCH 13/13] submodule: port submodule subcommand 'foreach' from shell to C

2017-08-07 Thread Prathamesh Chavan
tored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- In this new version, the following changes have been made: * A comment was added to clarify why the env variables were made available only for the case of argc == 1. builtin/submodule--helper.c | 142 ++

[GSoC] Update: Week-13

2017-08-15 Thread Prathamesh Chavan
SUMMARY OF MY PROJECT: Git submodule subcommands are currently implemented by using shell script 'git-submodule.sh'. There are several reasons why we'll prefer not to use the shell script. My project intends to convert the subcommands into C code, thus making them builtins. This will increase Git'

[GSoC][PATCH 1/4] submodule--helper: introduce get_submodule_displaypath()

2017-08-21 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- As said in the previous update, a short patch series is floated for the maintainer's review, and is consisting of the following changes: * introduce function get_submodule_displaypath() * introduce function for_each_submodule_list() * port fun

[GSoC][PATCH 3/4] submodule: port set_name_rev() from shell to C

2017-08-21 Thread Prathamesh Chavan
Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 63 + git-submodule.sh| 16 ++-- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin

[GSoC][PATCH 2/4] submodule--helper: introduce for_each_submodule_list()

2017-08-21 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH 4/4] submodule: port submodule subcommand 'status' from shell to C

2017-08-21 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

Re: [GSoC][PATCH 3/4] submodule: port set_name_rev() from shell to C

2017-08-21 Thread Prathamesh Chavan
On Mon, Aug 21, 2017 at 10:17 PM, Heiko Voigt wrote: > On Mon, Aug 21, 2017 at 09:45:14PM +0530, Prathamesh Chavan wrote: >> Function set_name_rev() is ported from git-submodule to the >> submodule--helper builtin. The function get_name_rev() generates the >> value of

[GSoC] Update: Week 14

2017-08-21 Thread Prathamesh Chavan
SUMMARY OF MY PROJECT: Git submodule subcommands are currently implemented by using shell script 'git-submodule.sh'. There are several reasons why we'll prefer not to use the shell script. My project intends to convert the subcommands into C code, thus making them builtins. This will increase Git'

[GSoC][PATCH v2 0/4] submodule: Incremental rewrite of git-submodules

2017-08-23 Thread Prathamesh Chavan
/week-14-1 And the build report is available at: https://travis-ci.org/pratham-pc/git/builds/ Branch: week-14-1 Build #163 Prathamesh Chavan (4): submodule--helper: introduce get_submodule_displaypath() submodule--helper: introduce for_each_submodule() submodule: port set_name_rev() from she

[GSoC][PATCH v2 1/4] submodule--helper: introduce get_submodule_displaypath()

2017-08-23 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 84562ec83..e666f84ba 100644 --- a/builtin/submodule

[GSoC][PATCH v2 2/4] submodule--helper: introduce for_each_submodule()

2017-08-23 Thread Prathamesh Chavan
Introduce function for_each_submodule() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule

[GSoC][PATCH v2 3/4] submodule: port set_name_rev() from shell to C

2017-08-23 Thread Prathamesh Chavan
printing. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 63 + git-submodule.sh| 16 ++-- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a

[GSoC][PATCH v2 4/4] submodule: port submodule subcommand 'status' from shell to C

2017-08-23 Thread Prathamesh Chavan
t. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-b

[GSoC][PATCH v3 0/4] Incremental rewrite of git-submodules

2017-08-24 Thread Prathamesh Chavan
series at: https://github.com/pratham-pc/git/commits/week-14-1 And its build report is available at: https://travis-ci.org/pratham-pc/git/builds/ Branch: week-14-1 Build #164 Prathamesh Chavan (4): submodule--helper: introduce get_submodule_displaypath() submodule--helper: introduce

[GSoC][PATCH v3 1/4] submodule--helper: introduce get_submodule_displaypath()

2017-08-24 Thread Prathamesh Chavan
Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 84562ec83..e666f84ba 100644 --- a/builtin/submodule

[GSoC][PATCH v3 3/4] submodule: port set_name_rev() from shell to C

2017-08-24 Thread Prathamesh Chavan
printing. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin/submodule--helper.c | 63 + git-submodule.sh| 16 ++-- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a

[GSoC][PATCH v3 2/4] submodule--helper: introduce for_each_listed_submodule()

2017-08-24 Thread Prathamesh Chavan
Introduce function for_each_listed_submodule() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- builtin

[GSoC][PATCH v3 4/4] submodule: port submodule subcommand 'status' from shell to C

2017-08-24 Thread Prathamesh Chavan
n its list. The function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signe

Re: [GSoC][PATCH v3 0/4] Incremental rewrite of git-submodules

2017-08-27 Thread Prathamesh Chavan
7;ll see the dirty merges and will resend the whole series after reviewing the dirty merge and sending a new one with/without changes as required. Thanks, Prathamesh Chavan

[GSoC][PATCH v4 0/4] Incremental rewrite of git-submodules

2017-08-28 Thread Prathamesh Chavan
h-series-1-next Prathamesh Chavan (4): submodule--helper: introduce get_submodule_displaypath() submodule--helper: introduce for_each_listed_submodule() submodule: port set_name_rev() from shell to C submodule: port submodule subcommand 'status' from shell to C builtin/

<    1   2   3   >