Skip to content

Instantly share code, notes, and snippets.

@jaipreet-s
Last active August 1, 2019 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaipreet-s/396da4a2c13f476dec393e480b4e8b20 to your computer and use it in GitHub Desktop.
Save jaipreet-s/396da4a2c13f476dec393e480b4e8b20 to your computer and use it in GitHub Desktop.
diff-gitref-tests
{
"base": {
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": []
},
"diff": [
{
"op": "patch",
"key": "cells",
"diff": [
{
"op": "addrange",
"key": 0,
"valuelist": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "Simple Diff Committed\n"
}
],
"source": "print('Simple Diff Committed')"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": ""
}
]
}
]
},
{
"op": "patch",
"key": "metadata",
"diff": [
{
"op": "add",
"key": "kernelspec",
"value": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
{
"op": "add",
"key": "language_info",
"value": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
}
]
}
]
}
{
"base": {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "Simple Diff in WORKING TREE\n"
}
],
"source": "print('Simple Diff in WORKING TREE')"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": ""
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
},
"diff": [
{
"op": "patch",
"key": "cells",
"diff": [
{
"op": "addrange",
"key": 0,
"valuelist": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "Simple Diff Committed\n"
}
],
"source": "print('Simple Diff Committed')"
}
]
},
{
"op": "removerange",
"key": 0,
"length": 1
}
]
},
{
"op": "replace",
"key": "nbformat_minor",
"value": 2
}
]
}
eaf1741 vs b82e191
ref_local: eaf1741 => Diff Entry Stream: path: SimpleDiff.ipynb blob: None ref_name: eaf1741 repo_dir: /workspace/github/diff-harness-2
ref_remote: b82e191 => Diff Entry Stream: path: SimpleDiff.ipynb blob: 6ee0498aa7b4102846492fb2d4c531891d60f0b9 ref_name: b82e191 repo_dir: /workspace/github/diff-harness-2
HEAD vs WORKING
ref_local: HEAD => Diff Entry Stream: path: SimpleDiff.ipynb blob: 6ee0498aa7b4102846492fb2d4c531891d60f0b9 ref_name: HEAD repo_dir =? /workspace/github/diff-harness-2
ref_remote: WORKING: Diff Entry Stream: path: SimpleDiff.ipynb blob: None ref_name: None repo_dir: /workspace/github/diff-harness-2
HEAD vs INDEX
ref_local HEAD => Diff Entry Stream: path: SimpleDiff.ipynb blob: 6ee0498aa7b4102846492fb2d4c531891d60f0b9 ref_name: HEAD repo_dir: /workspace/github/diff-harness-2
ref_remote INDEX => Diff Entry Stream: path: SimpleDiff.ipynb blob: 58d9d963732439f290697fac632ffd088280002f ref_name: <class 'git.diff.Diffable.Index'> repo_dir: /workspace/github/diff-harness-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment