Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-7993

Add option to commit whitespace if ignore whitespace setting is enabled

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Git
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Occasionally I will turn on the "Ignore whitespace" option when reviewing code, but forget and leave it on.  A few days later, I may commit some code, and stage each chunk individually from the editor.  The white space does not get committed though. 

      And the selected file shows an empty window with no indication that some changes still exist, other than the file being marked yellow in the staging area.  The reason this always throws me off is that I see this exact effect when there are newline bugs and Show Whitespace is enabled, so in those cases, I just discard the file.  I've never been able to narrow down what causes that, but it happens enough that I ignore the condition of a file that appears to have no changes in it.

      A couple of options for this:

      1. Simply display a hint in the right window when it is empty but a file still has changes, especially if the "Ignore Whitespace" option is enabled.  Something as simple as "There are whitespace changes that are currently not showing. Change your setting to Show Whitespace before committing so you don't lose any changes".
      2. When comitting with a file that is fully staged with all changes except whitespace changes, maybe present an alert or "Are you sure" explanation
      3. Add an option when committing to finish committing the remaining whitespace changes.

      I'm sure there are some other approaches as well.

              Unassigned Unassigned
              2c8cd742e27b reactive-core
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: