KEMBAR78
Comparing 0fa3cc77ee...06f5608c14 · git/git · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0fa3cc77ee
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 06f5608c14
Choose a head ref
  • 7 commits
  • 6 files changed
  • 1 contributor

Commits on Jan 2, 2019

  1. bisect--helper: bisect_reset shell function in C

    Reimplement `bisect_reset` shell function in C and add a `--bisect-reset`
    subcommand to `git bisect--helper` to call it from git-bisect.sh .
    
    Using `bisect_reset` subcommand is a temporary measure to port shell
    functions to C so as to use the existing test suite. As more functions
    are ported, this subcommand would be retired but its implementation will
    be called by some other method.
    
    Note: --bisect-clean-state subcommand has not been retired as there are
    still a function namely `bisect_start()` which still uses this
    subcommand.
    
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Mentored by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    5e82c3d View commit details
    Browse the repository at this point in the history
  2. bisect--helper: bisect_write shell function in C

    Reimplement the `bisect_write` shell function in C and add a
    `bisect-write` subcommand to `git bisect--helper` to call it from
    git-bisect.sh
    
    Using `--bisect-write` subcommand is a temporary measure to port shell
    function in C so as to use the existing test suite. As more functions
    are ported, this subcommand will be retired but its implementation will
    be called by some other methods.
    
    Note: bisect_write() uses two variables namely TERM_GOOD and TERM_BAD
    from the global shell script thus we need to pass it to the subcommand
    using the arguments. We then store them in a struct bisect_terms and
    pass the memory address around functions.
    
    Add a log_commit() helper function to write the contents of the commit message
    header to a file which will be re-used in future parts of the code as
    well.
    
    Also introduce a function free_terms() to free the memory of `struct
    bisect_terms` and set_terms() to set the values of members in `struct
    bisect_terms`.
    
    Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    0f30233 View commit details
    Browse the repository at this point in the history
  3. wrapper: move is_empty_file() and rename it as is_empty_or_missing_fi…

    …le()
    
    is_empty_file() can help to refactor a lot of code. This will be very
    helpful in porting "git bisect" to C.
    
    Suggested-by: Torsten Bögershausen <tboegi@web.de>
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    e3b1e3b View commit details
    Browse the repository at this point in the history
  4. bisect--helper: check_and_set_terms shell function in C

    Reimplement the `check_and_set_terms` shell function in C and add
    `check-and-set-terms` subcommand to `git bisect--helper` to call it from
    git-bisect.sh
    
    Using `--check-and-set-terms` subcommand is a temporary measure to port
    shell function in C so as to use the existing test suite. As more
    functions are ported, this subcommand will be retired but its
    implementation will be called by some other methods.
    
    check_and_set_terms() sets and receives two global variables namely
    TERM_GOOD and TERM_BAD in the shell script. Luckily the file BISECT_TERMS
    also contains the value of those variables so its appropriate to evoke the
    method get_terms() after calling the subcommand so that it retrieves the
    value of TERM_GOOD and TERM_BAD from the file BISECT_TERMS. The two
    global variables are passed as arguments to the subcommand.
    
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    4fbdbd5 View commit details
    Browse the repository at this point in the history
  5. bisect--helper: bisect_next_check shell function in C

    Reimplement `bisect_next_check` shell function in C and add
    `bisect-next-check` subcommand to `git bisect--helper` to call it from
    git-bisect.sh .
    
    `bisect_voc` shell function is no longer useful now and is replaced by
    using a char *[] of "new|bad" and "good|old" values.
    
    Using `--bisect-next-check` is a temporary measure to port shell
    function to C so as to use the existing test suite. As more functions
    are ported, this subcommand will be retired but its implementation will
    be called by some other methods.
    
    Helped-by: Stephan Beyer <s-beyer@gmx.net>
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    129a6cf View commit details
    Browse the repository at this point in the history
  6. bisect--helper: get_terms & bisect_terms shell function in C

    Reimplement the `get_terms` and `bisect_terms` shell function in C and
    add `bisect-terms` subcommand to `git bisect--helper` to call it from
    git-bisect.sh .
    
    Using `--bisect-terms` subcommand is a temporary measure to port shell
    function in C so as to use the existing test suite. As more functions
    are ported, this subcommand will be retired but its implementation will
    be called by some other methods.
    
    Also use error() to report "no terms defined" and accordingly change the
    test in t6030.
    
    We need to use PARSE_OPT_KEEP_UNKNOWN here to allow for parameters that
    look like options (e.g --term-good) but should not be parsed by
    cmd_bisect__helper(). This change is safe because all other cmdmodes have
    strict argc checks already.
    
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    450ebb7 View commit details
    Browse the repository at this point in the history
  7. bisect--helper: bisect_start shell function partially in C

    Reimplement the `bisect_start` shell function partially in C and add
    `bisect-start` subcommand to `git bisect--helper` to call it from
    git-bisect.sh .
    
    The last part is not converted because it calls another shell function.
    `bisect_start` shell function will be completed after the `bisect_next`
    shell function is ported in C.
    
    Using `--bisect-start` subcommand is a temporary measure to port shell
    function in C so as to use the existing test suite. As more functions
    are ported, this subcommand will be retired and will be called by some
    other methods.
    
    Also introduce a method `bisect_append_log_quoted` to keep things short
    and crisp.
    
    Note that we are a bit lax about command-line parsing because the helper
    is not supposed to be called by the user directly (but only from the git
    bisect script).
    
    Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
    Helped-by: Stephan Beyer <s-beyer@gmx.net>
    Mentored-by: Lars Schneider <larsxschneider@gmail.com>
    Mentored-by: Christian Couder <chriscool@tuxfamily.org>
    Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
    Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pranitbauva1997 authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    06f5608 View commit details
    Browse the repository at this point in the history
Loading