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

2017-09-21 Thread Han-Wen Nienhuys
LGTM with nits commit message: "revision name, and later handles its formating and printing." typo: formatting + if (!capture_command(&cp, &sb, 0) && sb.len) { + strbuf_strip_suffix(&sb, "\n"); + return strbuf_detach(&sb, NULL); +

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

2017-08-28 Thread Prathamesh Chavan
Function set_name_rev() is ported from git-submodule to the submodule--helper builtin. The function compute_rev_name() generates the value of the revision name as required. The function get_rev_name() calls compute_rev_name() and receives the revision name, and later handles its formating and print