Commits on Sep 10, 2017
  1. Fix: Compare against Origin hint in Preferences

    deathaxe committed Sep 10, 2017
    Copy the modified comment of "Compare against Origin" from GitGutter.sublime-settings to Preferences-sublime-settings-hints to display the new @{upstream} target in project specific settings tooltips (of PackageDev) as well.
Commits on Sep 9, 2017
  1. Enhancement: Flatten the Compare against Main Menu

    deathaxe committed Sep 9, 2017
    GitGutter provides the following menu items:
    - Main Menu -> View -> GitGutter -> Compare Against -> HEAD
    - Main Menu -> View -> GitGutter -> Compare Against -> branch
    - ...
    As the "Compare Against" menu item is almost the only one within "GitGutter" it makes reaching the desired ones unnecessarily complicated.
    Therefore this commit moves all "Compare against" menu items up by one level in order to make them accessible more easily.
    Furthermore it adds an entry to display the diff popup just for consistency.
  2. Enhancement: Add Revert Change to Edit Main Menu

    deathaxe committed Sep 9, 2017
    This commit intends to enhance consistency of commands availability. All of them should at least be available via
       - key bindings
       - command pallet
       - main menu (for legacy users)
    This commit therefore adds the git_gutter_revert_change command to the main menu with the hopefully clear and meaningful caption "Revert Change to Commit". To keep consistent, the caption is modified in the command pallet and README, too.
  3. Enhancement: Toggle GitGutter via Main Menu and Command Pallet

    deathaxe committed Sep 9, 2017
    Add a simple "toggle_setting" command to enable or disable GitGutter for the current view without entering the console and calling `view.settings().set("git_gutter_enable", False/True)`
  4. README: Update Goto/Revert Change

    deathaxe committed Sep 9, 2017
    This commit provides the following changes:
    1. The description of the following commands is moved just right after the diff popup paragraph to make them to be associated more obvious.
      - GitGutter: Goto Previous Change
      - GitGutter: Goto Next Change
      - GitGutter: Revert Change
    2. The "Jump" is replaced by "Goto" to reflect the association of the commands with the "Goto" main menu.
    3. The "Goto" commands are added to the command pallet.
  5. README: Update Compare against paragraph

    deathaxe committed Sep 9, 2017
    This commit adds the list of default key bindings to the paragraph as they are available for the other commands already.
  6. Internal: Reduce duplications in command objects

    deathaxe committed Sep 9, 2017
    This commit removes duplicate methods `run` which call `self.view.run_command('git_gutter', ...)` to forward commands to the main GitGutterCommand object of a view.
    The run() method is moved to the GitGutterBaseCommand class to be implemented once, only. Each command class stores an 'ACTION' class attribute to identify the action to forward to GitGutterCommand.
  7. Fix: Compare against Origin (Issue #371)

    deathaxe committed Aug 31, 2017
    Closes: #371
    This commit changes the "Compare against Origin" function to store `<branch_name>@{upstream}` as compare target instead of `<branch_name>` which might not be useful in all use cases.
    This modification enables a user to compare against the upstream revision of each currently checked out branch.
    The command name an the title are not modified for backward compatibility reasons.
    If the local branch doesn't have a tracked remote branch, each file is displayed as `inserted`.
Commits on Aug 31, 2017
  1. Internal: Remove unused import

    deathaxe committed Aug 31, 2017
Commits on Aug 27, 2017
  1. Enhancement: Add command with keybinding to revert changes

    deathaxe committed Aug 27, 2017
    With GitGutter's diff popup a user can revert a changed hunk to the state of the compared commit.
    This commit moves the code to perform the revert operation into a dedicated module and adds it to the internal command chain:
    1. Add the with the implementation moved from popup.factory module
    2. Add "revert_change" to command map in the main GitGutterCommand class.
       provides: `view.run_command("git_gutter", {"action": "revert_change"}`
    3. Add TextCommand "git_gutter_revert_change" meant for external use.
       provides: `view.run_command("git_gutter_revert_change"}`
    4. Add an entry to the Default.sublime-commands
    5. Add Ctrl+Shift+Alt+Z key binding.
    6. Add a short note to the README.
    NOTE: The revert operation does not work with multiple cursors at the moment.
Commits on Aug 16, 2017
  1. Cut 1.7.4

    deathaxe committed Aug 16, 2017
Commits on Aug 11, 2017
  1. Internal: Log the reason for GitGutter to be disabled

    deathaxe committed Aug 11, 2017
    In order to have a chance to determine, why GitGutter keeps quite for certain files, the reason is printed to console, if
      "debug": true
    is set. The state itself is handled as integer for performance reasons. The text message is created only, if GitGutter has something to tell. The descriptions are organized using a dict rather than a tuple to provide a clear and obvious association between the state id and the message being printed.
Commits on Aug 10, 2017
  1. Fix: Gutter icons are not displayed in Sublime Text 2

    deathaxe committed Aug 10, 2017
    The issue was introduced with commit 9e5ab88 which intends to reduce gutter icon jumping
    The view change counter is used to check whether to update the regions or not. If this counter is not available the gutter icons are never updated as the related function returns true in that case.
    This commit changes the behavior of the function to return False if the change counter is not available.
  2. Internal: Cache global settings as function attribute

    deathaxe committed Aug 10, 2017
    In order to avoid the usage of global variables the global settings object, which represents the GitGutter.sublime-settings is cached as attribute of the get() function.
  3. README: Add troubleshooting for GitGutter keeping disabled

    deathaxe committed Aug 10, 2017
    Add the list of situations when GitGutter keeps quite to let users know about them. The question arouse several times in the past.
Commits on Aug 2, 2017
  1. Cut 1.7.3

    deathaxe committed Aug 2, 2017
Commits on Jul 31, 2017
  1. Fix: Reduce gutter icon jumping while editing text

    deathaxe committed Jul 30, 2017
    As evaluation of changes and updating the gutter icons is handled asynchronously, the view might change in the meanwhile, rendering the evaluation result invalid or at least inaccurate. As the result lines can't be translated to correct regions anymore. Therefore added regions may jump up or down to the next line.
    To reduce this effect two changes are made:
    1. initial evaluation delay is increased to 200ms
    2. updating regions (gutter icons) is skipped if the view change counter has changed during evaluation
  2. Fix: IndexError exception in console (Issue #429)

    deathaxe committed Jul 29, 2017
    Fixes #429
    In order to quickly convert diff lines to sublime regions, a line_to_regions map is created using the view's content. As GitGutter runs asynchronously, the view content might change while evaluation is performed. This might render the map invalid in some situations causing the diff result contain lines exceeding the maps boundaries.
    For now evaluation and gutter update is aborted on such an IndexError. The next evaluation will hopefully do a better job. This might lead to gutter not being updated in some situations but automatic repetition might result in an endless loop if the evaluation fails due to a hard exception and is therefore not done.
  3. README: Add trouble shooting section for working tree

    deathaxe committed Jul 29, 2017
    This adds important information provided by @coolynx in Issue #388.
  4. README: Use animated screenshots captured with latest Sublime Text

    deathaxe committed Jul 29, 2017
    The screenshots being used to illustrate GitGutter's features are quite aged. To improve the first impression animated screenshots are used which were captured using Sublime Text 3142 and GitGutter 1.7.2 to show the latest state of developement.
  5. README: Fix some smaller graphical glitches

    deathaxe committed Jul 29, 2017
    - remove wrong `_`
    - centered alignment of first column of tables
Commits on Jul 29, 2017
  1. Fix: Correctly decode empty git output

    deathaxe committed Jul 29, 2017
    If git returns empty output `git_handler.execute()` ignores the `decode` argument which may cause following functions to fail as they expect a string then.
  2. Fix: Don't use Consolas font in diff popup

    deathaxe committed Jul 29, 2017
    mdpopups enforces
       font-face: "sf mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    for the code view by default. On Windows "Consolas" is used, which is not able to render the new line character `↵` well. Therefore Consolas is replaced by "Roboto Mono".
Commits on Jul 28, 2017
  1. Fix: Default preferences override GitGutter.sublime-settings (issue #204

    deathaxe committed Jul 28, 2017
    The Preferences.sublime-settings added to support PackageDev's settings completions/linting/tooltips overrides all settings made to the GitGutter.sublime-settings
    As long as we don't decide to remove GitGutter.sublime-settings and store all settings in Preferences.sublime-settings there must not exist such a file to provide default values.
    Therefore it is renamed to Preferences.sublime-settings-hints which is used by PackageDev to load information from, too.
Commits on Jul 20, 2017
  1. Fix: Wrong compare target Preferences and GitGutter.sublime-settings

    deathaxe committed Jul 20, 2017
    The default `compare_target` value added with the last commit works with `status_porcelain` branch only.
    The value "CACHED" is not yet supported in the master branch.
Commits on Jul 11, 2017
  1. Fix: Comments in settings files contain wrong values (regression)

    deathaxe committed Jul 11, 2017
    1. Find and Replace replaced too much.
    2. Optimize comment of "git_gutter_compare_against"
Commits on Jul 8, 2017
  1. Enhancement: Add support for PackageDev settings linting

    deathaxe committed Jul 8, 2017
    PackageDev 3.0.0-beta.1 introduces linting for sublime-settings files.
    In order to prevent it from highlighting GitGutter settings in Preferences.sublime-settings as unknown, we need to add a default file for it.
    It is just a copy of GitGutter.sublime-settings with `git_gutter_` prefix added to all keys.
Commits on Jun 8, 2017
  1. Cut 1.7.2

    deathaxe committed Jun 8, 2017
  2. Enhancement: Add support for git diff --histogram algorithm (Issue #422)

    deathaxe committed Jun 8, 2017
    Issue #422 proposes the usage of `git diff --histogram` to determine file modifications.
    This commit therefore replaces the "patience" setting by a more general "diff_algorithm". This key can be set to ("default", "minimal", "patience", "histogram") to select the desired diff algorithm. The setting is internally translated to the command line argument to ensure only valid arguments are passed to git.
  3. Fix: Limit mdpopups usage required for 2.0.0+

    deathaxe committed Jun 8, 2017
    mdpopups 2.0.0+ requires Sublime Text 3124+
    Diff Popup at least requires Sublime Text 3119+ with mdpopups 1.9.0+
    This commit adds the required version checks to fulfill these rules.
Commits on Jun 2, 2017
  1. Fix: diff popup is not displayed if view is scrolled horizontal.

    deathaxe committed Jun 2, 2017
    The diff popup was placed to the first column of the hovered row. If the first column is not visible due to horizontal scroll position, the popup is not created by Sublime Text.
    Therefore a new function `_visible_text_point()` is used to return the text point of the first visible column of the hovered row, which is used for popup creation now.
Commits on Jun 1, 2017
Commits on May 31, 2017
  1. Enhancement: Scroll to beginning of reverted hunk if not in visible r…

    deathaxe committed May 31, 2017
    If larger blocks of changes are reverted using diff popup whose beginning is
    off the visible region one could quickly loose track of what happened.
    Therefore the view is scrolled to the beginning of the hunk if it is not within
    the visible region.
  2. Enhancement: Call popup creation synchrounous to reduce delay

    deathaxe committed May 31, 2017
    Diff popup creation was called by set_timeout_async to keep the GUI responsive
    while popup is created in the background. Since ST 3132 it causes an additional
  3. Fix: Copy text from diff popup fails

    deathaxe committed May 31, 2017
    The list `del_lines` needs to be joined before it can be passed as text to the clipboard.
    This regression was caused by merging from a different branch with little different handling.