[PATCH v2 0/6] convert various shell functions in git-bisect to C
- From
Pranit Bauva <pranit.bauva@gmail.com>
- Date
- Jun 15, 2016, 14:00 UTC
- Message-ID
- <20160615140026.10519-1-pranit.bauva@gmail.com>
- In-Reply-To
- <20160607205454.22576-1-pranit.bauva@gmail.com>
A previous version is available here[1].
Changes wrt previous version: * Use STRING_LIST_INIT_NODUP to avoid leaks in bisect_clean_state() * Use test_path_is_missing in the patch 2/6 * drop file_size() * move is_empty_file() method from builtin/am.c to wrapper.c * use static for methods * remove the variable status in bisect_reset() altogether and put the whole thing inside the if block. * one more method converted namely bisect_write().
An important thing to be discussed: In shell script while reading/writing files, no error is reported but we can actually report it in C. In this series I have tried to output error wherever possible. What are your views?
[1]: http://thread.gmane.org/gmane.comp.version-control.git/296717
Pranit Bauva (6):
bisect--helper: `bisect_clean_state` shell function in C
t6030: explicitly test for bisection cleanup
wrapper: move is_empty_file() from builtin/am.c
bisect--helper: `bisect_reset` shell function in C
bisect--helper: `is_expected_rev` & `check_expected_revs` shell
function in C
bisect--helper: `bisect_write` shell function in Cbuiltin/am.c | 16 ---- builtin/bisect--helper.c | 194 +++++++++++++++++++++++++++++++++++++++++++- cache.h | 3 + git-bisect.sh | 97 +++------------------- t/t6030-bisect-porcelain.sh | 17 ++++ wrapper.c | 13 +++ 6 files changed, 236 insertions(+), 104 deletions(-)
-- 2.9.0