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

Add a /gitdiff API #482

Merged
merged 14 commits into from Aug 2, 2019
Merged

Add a /gitdiff API #482

merged 14 commits into from Aug 2, 2019

Commits on Jun 17, 2019

  1. Add a server API to perform git diff

    This change adds a server endpoint to diff two git refs for a single file. This is flexible to perform diffs across various points in the Git lifecycle such as diff'ing changes in the Working Tree, Index, or two arbitrary commits. There are two reserverd refs WORKING and INDEX to designate the Working Tree and the git Index
    Jaipreet Singh committed Jun 17, 2019
    Copy the full SHA
    477f525 View commit details
    Browse the repository at this point in the history
  2. Ensure backwards compatibility when remote=None

    Jaipreet Singh committed Jun 17, 2019
    Copy the full SHA
    690161e View commit details
    Browse the repository at this point in the history
  3. Improve documentation

    Jaipreet Singh committed Jun 17, 2019
    Copy the full SHA
    5c23333 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2019

  1. Add reserved field for special refs

    Additionally,
    
    * Improve error handling to return a JSON response so that the frontend can process it gracefully.
    Jaipreet Singh committed Jul 12, 2019
    Copy the full SHA
    7ccc993 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2019

  1. Resolve base correctly if file is deleted; Add more docs

    Again, this is backwards compatible with the existing /diff API which uses the "git:" prefixes.
    Jaipreet Singh committed Jul 17, 2019
    Copy the full SHA
    ef13feb View commit details
    Browse the repository at this point in the history
  2. Unit test for server extension API

    Jaipreet Singh committed Jul 17, 2019
    Copy the full SHA
    8f7a91a View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2019

  1. Adjust git api entry code

    Avoid extra param and other changes to internal functions, whie still supporting the new cleaner API.
    vidartf committed Jul 30, 2019
    Copy the full SHA
    979b7ea View commit details
    Browse the repository at this point in the history
  2. Minro cleanup

    vidartf committed Jul 30, 2019
    Copy the full SHA
    94100ab View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2019

  1. Handle empty blobs correctly

    If a file was added or deleted, GitPython will indicate the blob as None. In the current case, we would always read the file from disk so the file contents would be same as the Working Tree. This commit modifies that handling to handle the Working Tree case separately, and the None blob case separately.
    
    Tested on the both the nbdime and Git lab extensions.
    Jaipreet Singh committed Jul 31, 2019
    Copy the full SHA
    7bb0928 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2019

  1. Tweak comments/docstrings

    vidartf committed Aug 2, 2019
    Copy the full SHA
    19c5c65 View commit details
    Browse the repository at this point in the history
  2. Minor cleanup

    vidartf committed Aug 2, 2019
    Copy the full SHA
    8973fc6 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    fc3bc8b View commit details
    Browse the repository at this point in the history
  4. Add missing quotes

    vidartf committed Aug 2, 2019
    Copy the full SHA
    a9135d2 View commit details
    Browse the repository at this point in the history
  5. Dedupe curdir property (DRY)

    vidartf committed Aug 2, 2019
    Copy the full SHA
    bf1fc75 View commit details
    Browse the repository at this point in the history