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

Git: Fixed error when staging in empty repository #82995

Merged
merged 1 commit into from
Nov 29, 2019

Commits on Oct 21, 2019

  1. Git: Fixed error when staging in empty repository

    Trying to stage a commit in an empty repository (i.e. no prior commits)
    results in a git fatal error. This is because in an empty repo, HEAD
    doesn't point to anything causing `git ls-tree -l HEAD ...` to fail.
    
    To fix this, send `treeish` as `'HEAD'` to `getObjectDetails()` only if
    there is at least one commit in the repo. Else, send an empty string
    causing `getObjectDetails()` to use `lsFiles` instead of `lsTree`.
    
    Fixes microsoft#82026
    anirudhrb committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    7b1a6c8 View commit details
    Browse the repository at this point in the history