Skip to content

Commit missing in history view #12506

Closed

Description

@sgilberg

Describe the bug

I'm looking at a specific feature branch on my github repo in the browser and on the Github Desktop app. There is a specific commit that exists and shows up in the browser, but I cannot find it in the "History" tab of the Desktop app (yes I have fetched origin, and the code edits from that commit are showing in my code editor). I noticed that a recent update allowed commits to be reordered, so I wonder if something went wonky there? Commits have always shown in reverse order by date, and there is a distinct gap on the date when this commit took place.

Version & OS

Version 2.9.0, macOS 11.3.1.

Steps to reproduce the behavior

Not sure it can be reproduced without access to this repo, which is private. This is the first commit I have seen affected. But I'll describe my steps anyway in case it helps:

  1. Toggle to feature branch in Desktop app.
  2. Fetch origin.
  3. Look for commit where particular change was made, scrolling in the History tab down to the date of the change. Scratch head (commit missing).
  4. Navigate browser to list of commits for this feature branch in github. Confirm that commit exists there.

Expected behavior

I expect to see the commit I'm looking for at the date that it was committed.

Actual behavior

Commit is missing from History tab in Desktop app.

Screenshots

Without showing too much, since this is a private repo, here's a snippet of the commit list from the browser (with the commit from January 20):
Screen Shot 2021-06-24 at 4 07 47 PM

And a snippet of the History tab from the Desktop app (without the commit):
Screen Shot 2021-06-24 at 4 08 11 PM

Logs

N/A

Additional context

N/A

Activity

  1. sergiou87 commented on Jun 25, 2021

    @sergiou87
    Member

    Thank you for your report @sgilberg!! ❤️

    We were investigating this issue reported for someone else, but we couldn't reproduce it ourselves. This other user also saw it in an older version of the app.

    In theory, the app is just showing the same as git log would. Could you try running git log in that repo from a terminal and see if the commit is visible there?

  2. added
    bug
    priority-2
    on Jun 25, 2021
  3. sergiou87 commented on Jun 25, 2021

    @sergiou87
    Member

    This seems related to #3704 too. Have you tried just restarting the app or removing the repo from the app (not from your disk) and adding it again?

    I also wonder if just cloning the repository again in a different folder would help to see the commit again 🤔

  4. sgilberg commented on Jun 25, 2021

    @sgilberg
    Author

    Thanks @sergiou87! I ran git log and I do see the commit there. I tried restarting the app (and the machine, just in case!) and still not seeing the commit. I tried removing the repository and re-adding it, still not seeing the commit. Tried recloning too, still not seeing it.

    It could be related to the issue you mentioned. It looks like this branch did merge in the master branch also after the commit was made. Sorry I didn't see that older issue in my search before opening this one.

  5. sergiou87 commented on Jun 25, 2021

    @sergiou87
    Member

    No worries! Your feedback is awesome and super focused, which is super helpful.

    It blows my mind that git log shows it but the app doesn't, even after re-adding the repo, cloning it somewhere else, etc. 🤯 I'll think about this and get back to you next week with some ideas to try out.

    Thank you so much for the responsiveness and the help!!! ❤️

  6. self-assigned this
    on Jun 25, 2021
  7. sergiou87 commented on Jul 1, 2021

    @sergiou87
    Member

    Just an update, I might have access to another repo where this also happens and debug there. I'll keep you posted!

  8. sergiou87 commented on Jul 1, 2021

    @sergiou87
    Member

    Just so everyone knows, I got access to a repo where I could reproduce the issue and understand where the problem is:

    Right now the app paginates the commits in the History tab. In order to load a new page, it grabs the SHA of the last commit displayed, and runs git log <whatever-sha>^. The ^ at the end makes git start looking for commits starting with the parent of the given commit. First problem with this? If the last commit in a page is a merge commit, those have 2 (or more!) parents, and git will always choose the first one, so anything coming from the other parents will be simply lost.

    My first attempt to fix this was to remove the ^, so that merge parents don't present an issue. However… if the last commit in a page is a commit in a different branch, and there were other commits made before this branch was merged, those other commits will be lost:

    image

    Screen.Recording.2021-07-01.at.18.53.36.mov

    I have to investigate how can we reliably get all the commits that belong to the current branch efficiently. For example, checking what dotcom does exactly.

  9. sgilberg commented on Jul 1, 2021

    @sgilberg
    Author

    @sergiou87 Excellent sleuthing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority-2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions