Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't search/list every single repo reference when explicit references are provided #112

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Sep 25, 2023

  1. Configuration menu
    Copy the full SHA
    9d71973 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Still run git for-each-ref when explicit roots and reference filter…

    …s are specified
    
    When explicit roots and reference filters are both provided, we want to make
    sure that the optimisation don't kick in. As we still want to iterate
    over all references in order to apply the filters.
    
    Here is an example with git-sizer being run with explicit roots and reference filters
    ```
    git-sizer main~20^{tree} main~10^{tree} --tags --branches
    ```
    elhmn committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    721e353 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. Don't print the referecence count when explicit roots are provided

    We printed out the reference count, even when explicit roots were
    provided.
    ```
    git-sizer master~50^{tree} 'HEAD@{1.week.ago}' -v
    [TRUNCATED_OUTPUT]
    | * References                 |           |                                |
    |   * Count                    |   187     |                                |
    |     * Ignored                |   187     |                                |
    |                              |           |                                |
    [TRUNCATED_OUTPUT]
    ```
    
    This is not very useful, as the reference count depends on the list of references
    extracted by running `git for-each-ref`.
    
    This commit changes the output to not print the reference count when
    explicit roots and no reference filters are provided to git-sizer
    elhmn committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    0315cba View commit details
    Browse the repository at this point in the history
  2. Don't print reference count for json v1

    The reference count is still displayed when the -j flag is passed to
    git-sizer.
    ```
    git-sizer master~50^{tree} 'HEAD@{1.week.ago}' -v -j
    [TRUNCATED_OUTPUT]
        "reference_count": 15,
        "reference_groups": {
            "ignored": 15
        },
    [TRUNCATED_OUTPUT]
    ```
    
    We don't want to print the reference count for json v1, when explicit
    root are not provided git-sizer
    elhmn committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    d407c86 View commit details
    Browse the repository at this point in the history