title: Strange output of git diff to file in Ubuntu
body: <p>Ubuntu 13.04. I want to create a patch and there is no problem when I'm using Netbeans or other IDE but when I run in command line:</p>
  
  <pre><code>git diff &gt; 1.patch
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>cat 1.patch
  </code></pre>
  
  <p>output looks like this:</p>
  
  <pre><code>diff --git a/sites/all/modules/pet/pet.module b/sites/all/modules/pet/pet.module
  index adfd273..1091090 100755
  --- a/sites/all/modules/pet/pet.module
  +++ b/sites/all/modules/pet/pet.module
  @@ -71,7 +71,7 @@ function pet_access($op, $type = NULL, $account = NULL) {
   /**
    * Implements hook_permission().
    */
  -function pet_permission() {  
  +function pet_permission() {
     $permissions = array(
       'administer previewable email templates' =&gt;  array(
         'title' =&gt; t('Administer previewable email templates'),
  @@ -183,26 +183,26 @@ function pet_lookup_uid($mail) {
   /**
    * Send tokenized email to a list of recipients.
    *
  - * Given a list of recipients, and an optional node id, perform token 
  + * Given a list of recipients, and an optional node id, perform token
    * substitution and send an email to each. The node substitutions, if any,
    * are the same in each email sent.  The user tokens, if any are custom based
  - * on the account (if any) associated with each email.  
  + * on the account (if any) associated with each email.
    *
    * @param $name
    *   The unique name of the PET template.
    * @param $recipients
    *   An array of at least one recipient in one of two formats:
    *      1. a simple email address, in which case the uid is looked up
  - *      2. an array('mail' =&gt; &lt;email address&gt;, 'uid' =&gt; &lt;uid&gt;) in which case 
  + *      2. an array('mail' =&gt; &lt;email address&gt;, 'uid' =&gt; &lt;uid&gt;) in which case
    *         the uid is already available (more efficient)
    * @param $options
    *   An array of options as follows:
    *      nid - An optional node id for token substitutions.
  - *      subject - An optional subject which if provided will override the 
  + *      subject - An optional subject which if provided will override the
    *        subject in the PET.
    *      body - An optional body which if provided which will override the body
    *        in the PET.
  - *      body_plain - An optional plain text body which if provided which will 
  + *      body_plain - An optional plain text body which if provided which will
    *        override the plain text body in the PET.
    *      from - An optional from email which if provided which will override the
    *        from in the PET (which in turn overrides the site default).
  @@ -221,12 +221,12 @@ function pet_send_mail($name, $recipients, $options) {
       watchdog('pet', 'At least one recipient must be provided for PET %name.', array('%name' =&gt; $name), WATCHDOG_NOTICE);
       return;
     }
  </code></pre>
  
  <p>but gedit shows this:</p>
  
  <pre><code>[1mdiff --git a/sites/all/modules/pet/pet.module b/sites/all/modules/pet/pet.module[m
  [1mindex adfd273..1091090 100755[m
  [1m--- a/sites/all/modules/pet/pet.module[m
  [1m+++ b/sites/all/modules/pet/pet.module[m
  [36m@@ -71,7 +71,7 @@[m [mfunction pet_access($op, $type = NULL, $account = NULL) {[m
   /**[m
    * Implements hook_permission().[m
    */[m
  [31m-function pet_permission() {  [m
  [32m+[m[32mfunction pet_permission() {[m
     $permissions = array([m
       'administer previewable email templates' =&gt;  array([m
         'title' =&gt; t('Administer previewable email templates'),[m
  [36m@@ -183,26 +183,26 @@[m [mfunction pet_lookup_uid($mail) {[m
   /**[m
    * Send tokenized email to a list of recipients.[m
    *[m
  [31m- * Given a list of recipients, and an optional node id, perform token [m
  [32m+[m[32m * Given a list of recipients, and an optional node id, perform token[m
    * substitution and send an email to each. The node substitutions, if any,[m
    * are the same in each email sent.  The user tokens, if any are custom based[m
  [31m- * on the account (if any) associated with each email.  [m
  [32m+[m[32m * on the account (if any) associated with each email.[m
    *[m
    * @param $name[m
    *   The unique name of the PET template.[m
    * @param $recipients[m
    *   An array of at least one recipient in one of two formats:[m
    *      1. a simple email address, in which case the uid is looked up[m
  [31m- *      2. an array('mail' =&gt; &lt;email address&gt;, 'uid' =&gt; &lt;uid&gt;) in which case [m
  [32m+[m[32m *      2. an array('mail' =&gt; &lt;email address&gt;, 'uid' =&gt; &lt;uid&gt;) in which case[m
    *         the uid is already available (more efficient)[m
    * @param $options[m
    *   An array of options as follows:[m
    *      nid - An optional node id for token substitutions.[m
  </code></pre>
  
  <p>.</p>