Week 10 & 11

Hey folks,

My internship is about to end in a week. I have learnt so many new technicalities. I loved my internship period. I will always remember this as a worth experience of my life.

Talking about my project. I have successfully submitted my second patch series.
Git mailing list link: https://public-inbox.org/git/

The changes that are introduced in the second  patch series are as follows:

## Changes since pranit’s v15 patch series

#### bisect--helper: refer `branch.buf` before `strbuf_release(...)`

#### bisect--helper: change `retval` to `res`

#### bisect--helper: `decide_next()` helper function.

#### bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

##### Divided this commit into nine commits

1. bisect.c: libify `exit_if_skipped_commits` to `error_if_skipped...`
2. bisect.c: libify `bisect_checkout` and its dependants
3. bisect.c: libify `check_merge_bases` and its dependents.
4. bisect.c: libify `check_good_are_ancestors_of_bad` and its dependents
5. bisect.c: libify `handle_bad_merge_base` and its dependants
6. bisect.c: libify `bisect_next_all` and its dependants
7. bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C
8. bisect--helper: Finish `bisect_start()` conversion
9. bisect--helper: dequote arguments in `bisect-start`

    • changed `error` to `return error`
    • Removed `goto done;` as it was present just before `done:` call
    • Use `xstrdup(argv[i])` instead of `argv[i]` to prevent memory leak
    • Adjusted the indentation Style: removed a space left of the comma.
    • Changed the `find the next bisection state` statement to ‘checkout the next bisection commit’
    • Changed ‘sha1_to_hex’  to ‘oid_to_hex’ as modern code does not use this unsigned function
    • Changed the return type from ‘void’ to ‘int’ as the function was returning a value
    • Changed ‘const unsigned sha1’ to ‘struct object_id oid’
    • Changed `(res == 10)` branch and the `(res == 2)` branch into separate functions`bisect_successful(struct bisect_terms *terms)` and `bisect_skipped_commits(struct bisect_terms *terms)`respectively and just call them.
    • Removed unnecessary comments
    • Changed exit code to return type like `exit(2)` to `return 2;` and `exit(res)` to `return res;`
    • Changed `handle_bad_merge_base();` to declare `res = handle_skipped_merge_base(mb);`
    • Changed `bisect_start` to `git bisect--helper --bisect-start`


#### bisect--helper: retire `--bisect-clean-state` subcommand

#### bisect--helper: retire `--next-all` subcommand

#### bisect--helper: retire `--check-expected-revs` subcommand

#### bisect--helper: retire `--write-terms` subcommand

#### bisect--helper: retire `--bisect-write` subcommand

#### bisect--helper: retire `--bisect-autostart` subcommand

#### bisect--helper: retire `--bisect-auto-next` subcommand

#### bisect--helper: retire `--check-and-set-terms` subcommand

#### bisect--helper: `bisect_autostart` shell function in C

    • Use `STDIN_FINENO` instead of `0`.
    • Fix typo `THe` to `The`
    • Use `return 1` instead of `exit(0). Saying `no` is same outcome as not having a tty to ask for yes or no.
    • Add missing `is` in `N_("start the bisection if BISECT_START empty or missing"), BISECT_AUTOSTART),`
    • use `set_terms()`
    • `die(“...”)` to `return error(“...”)`


#### bisect--helper: `bisect_state` & `bisect_head` shell function in C
    • move `get_terms()` to `cmd_bisect__helper()`
    • `die(“...”)` to `return error(“...”)`
    • use `oid` instead of `sha1`. convert dependant functions also.
    • `check_expected_revs()` returns void, remove `if` around it.
    • use `set_terms()`


#### bisect--helper: `bisect_log` shell function in C
    • use `STDOUT_FILENO` instead of `1`.
    • `die(“...”)` to `return error(“...”)`


#### bisect--helper: `bisect_replay` shell function in C
    • use “cannot read file '%s' for replaying” error message instead of “no such file with name '%s' exists”, as it would be misleading if the file exists but is empty.
    • `starts_with(word.buf, "#")` would be more accurate and can also handle cases where user edited the file and accidently removed `<space>` between `# bad….`
    • `bisect_terms()` now accepts `terms` and `option`.
    • use more informative error message : “Replay file contains rubbish ("%s")”
    • remove unnecessary `goto finish`
    • `die(“...”)` to `return error(“...”)`
    • use `set_terms()`


#### bisect--helper: remove the dequote in `bisect_start()`
#### bisect--helper: `bisect_skip` shell function in C

Comments

Popular posts from this blog

Week 4 & 5 - A week for the Audience

Week 1 - Getting Started with FOSS and GIT Community