Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-3004

Calculate "N commits behind" using `--first-parent` flag

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Requirements: Empty repository with a remote on machine M1 with git-flow initialised (`develop` branch is required).

      Steps to reproduce:

      1. M1: create a feature branch;
      2. M1: check out the feature branch;
      3. M1: make few commits in the feature branch (N > 1);
      4. M1: push the feature branch to remote;
      5. M2: pull the changes and checkout the develop branch;
      6. M2: merge the feature branch into develop;
      7. M2: push the merge commit to origin;
      8. M1: fetch (not pull) the changes from origin;

      Now observe, that develop branch on M1 is N commits behind the remote one when it actually should be only 1 commit behind (the 1 commit that is merge between feature and develop branches). The SourceTree counts the commits using the last, not the first parent of the merge commit. To fix this you can use `--first-parent` flag that appeared in git 1.8.4.

      Please ignore this improvement request if that's intended behavior.

      Attachments

        Activity

          People

            Unassigned Unassigned
            d9a4de1b6639 Eimantas Vaiciunas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: