title: How to prevent magit from formatting tabs and spaces
body: <p>I use <a href="https://www.emacswiki.org/emacs/SmartTabs" rel="nofollow noreferrer">SmartTabs</a> in my code.</p>
  
  <p>I've discovered that <a href="https://www.emacswiki.org/emacs/Magit" rel="nofollow noreferrer">Magit</a> has been undoing some of my indentation in my commits. Namely it doesn't like mixed tabs and spaces in a single line.</p>
  
  <p>Example:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>function(parameter1,
  .........parameter2,
  .........[](){
  .........\t // Code goes here
  .........});
  </code></pre>
  
  <p>Where <code>.</code> is a space and <code>\t</code> is a tab.</p>
  
  <p>I want the code to be lined up with the function name (spaces) but then indented in the lambda (tabs).  Magit will either move the tabs to the left of the spaces or convert all of the spaces to tabs.</p>
  
  <p>I've tried adjusting every setting I can find and have even commented out all references to git's white-spaces parameters in Magit's source, but it's still doing it.</p>
  
  <p>How do I disable this "feature" of Magit?</p>
  
  <p>Temporarily I've been using <code>git add --interactive</code>.</p>
  
  <hr>
  
  <p>Reproduction:</p>
  
  <pre class="lang-sh prettyprint-override"><code>mkdir test_dir
  cd test_dir
  git init
  touch test_file.c
  git add test_file.c
  git commit -m "Message 1"
  emacs test_file.c
  M-:(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/")))
  M-:(package-refresh-contents)
  M-:(package-install 'magit)
  &lt;Space&gt;C-q&lt;Tab&gt;text
  M-x magit-status
  # arrow down to the file
  s 
  </code></pre>