Skip to content

Instantly share code, notes, and snippets.

@Sublimerge
Last active December 29, 2015 01:09
Show Gist options
  • Save Sublimerge/7590816 to your computer and use it in GitHub Desktop.
Save Sublimerge/7590816 to your computer and use it in GitHub Desktop.
Sublimerge: Compare to Tag… A Custom Comparison for Sublimerge v2.7.5 for Git users. Compare your current working copy with any tag. Sublimerge is a professional, side-by-side diff tool for Sublime Text 2 and 3 / www.sublimerge.com
{
"custom_comparisons_user": [
{
"name": "Compare to Tag...",
"requires": "git",
"steps": [
{
"quick_panel": {
"name": "tag",
"source": {
"execute": {
"command": "{config:git_executable_path} tag",
"directory": "{sublimerge:repo_root}"
},
"item": {
"regexp": "^.*$",
"caption": ["@0", "{sublimerge:current_file_name} in @0"],
"value": "@0"
},
"reverse": true, //remove it for compatibility with Sublimerge v2.7.4
"empty_message": "There are no tags"
}
}
},
{
"define": {
"output_file": "{sublimerge:temp_dir}/{sublimerge:current_file_name}@{tag}"
}
},
{
"compare": {
"execute": {
"command": "{config:git_executable_path} show \"{tag}\":\"./{sublimerge:current_file_name}\" > \"{output_file}\"",
"directory": "{sublimerge:current_file_dir}"
},
"left": {
"file": "{output_file}",
"temporary": true
},
"right": {
"file": "{sublimerge:current_file}",
"temporary": false
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment