Last active
December 29, 2015 01:09
-
-
Save Sublimerge/7590901 to your computer and use it in GitHub Desktop.
Sublimerge: Show Changes Between Tags… A Custom Comparison for Sublimerge v2.7.5 for Git users to compare two tags with each other. Sublimerge is a professional, side-by-side diff tool for Sublime Text 2 and 3 / www.sublimerge.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"custom_comparisons_user": [ | |
{ | |
"name": "Show Changes Between Tags...", | |
"requires": "git", | |
"steps": [ | |
{ | |
"quick_panel": { | |
"name": "tag1", | |
"source": { | |
"execute": { | |
"command": "{config:git_executable_path} tag", | |
"directory": "{sublimerge:repo_root}" | |
}, | |
"item": { | |
"regexp": "^.*$", | |
"caption": ["@0"], | |
"value": "@0" | |
}, | |
"reverse": true, //remove it for compatibility with Sublimerge v2.7.4 | |
"empty_message": "There are no tags" | |
} | |
} | |
}, | |
{ | |
"quick_panel": { | |
"name": "tag2", | |
"source": { | |
"execute": { | |
"command": "{config:git_executable_path} tag --contains \"{tag1}\"", | |
"directory": "{sublimerge:repo_root}" | |
}, | |
"item": { | |
"regexp": "^.*$", | |
"caption": ["@0", "Compare @0 to {tag1}"], | |
"value": "@0" | |
}, | |
"none": { //remove it for compatibility with Sublimerge v2.7.4 | |
"values": ["{tag1}"] //do not display previously selected tag on the list | |
}, | |
"reverse": true, //remove it for compatibility with Sublimerge v2.7.4 | |
"empty_message": "There are no newer tags" | |
} | |
} | |
}, | |
{ | |
"quick_panel": { | |
"name": "file", | |
"source": { | |
"execute": { | |
"command": "{config:git_executable_path} log \"{tag1}\"..\"{tag2}\" --name-status --no-decorate --pretty=\"format:\"", | |
"directory": "{sublimerge:repo_root}" | |
}, | |
"item": { | |
"regexp": "^M\\s+(.+)$", | |
"caption": ["@1", "Show changes between {tag1} and {tag2}"], | |
"value": "@1", | |
"unique": true | |
}, | |
"alpha": true, //remove it for compatibility with Sublimerge v2.7.4 | |
"empty_message": "There are no changes between {tag1} and {tag2}" | |
} | |
} | |
}, | |
{ | |
"define": { | |
"left_file": "{sublimerge:temp_dir}/{file|basename}@{tag1}{file|ext}", | |
"right_file": "{sublimerge:temp_dir}/{file|basename}@{tag2}{file|ext}" | |
} | |
}, | |
{ | |
"capture": { | |
"execute": { | |
"command": "{config:git_executable_path} show \"{tag2}\":\"./{file}\" > \"{right_file}\"", | |
"directory": "{sublimerge:repo_root}" | |
} | |
} | |
}, | |
{ | |
"compare": { | |
"execute": { | |
"command": "{config:git_executable_path} show \"{tag1}\":\"./{file}\" > \"{left_file}\"", | |
"directory": "{sublimerge:repo_root}" | |
}, | |
"left": { | |
"file": "{left_file}", | |
"title": "{file|basename}@{tag1}", | |
"temporary": true | |
}, | |
"right": { | |
"file": "{right_file}", | |
"title": "{file|basename}@{tag2}", | |
"temporary": true | |
} | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment