git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 乙酸鋰 <ch3cooli@gmail.com>
To: git <git@vger.kernel.org>
Subject: Diff filename has trailing tab if filename contains space
Date: Sat, 5 Mar 2016 07:50:32 +0800	[thread overview]
Message-ID: <CAHtLG6TLAOA0hg897EntOjG1kJsZEmjDshc-yyO9zP27540AAg@mail.gmail.com> (raw)

Hi,

Using git 2.7.1

Diff filename has trailing tab if filename contains space
Please run below shell script
and look at the output diff file 1.diff
There is trailing tab chars after these lines:
--- a/8 1/8.txt
+++ b/8 1/8.txt
---- b/9 86
+++ b/9 86



#!/bin/sh
set -e
git init

echo a >> "normal"
git add "normal"
echo y >> "9 86"
git add "9 86" # file name has space
mkdir x
echo d >> "x/normal"
git add "x/normal"
mkdir "8 1"
echo u >> "8 1/8.txt" # directory name has space
echo k >> "8 1/8.txt"
git add "8 1/8.txt"
git commit -m "Initial commit"

echo b >> "normal"
git add "normal"
echo c >> "9 86"
git add "9 86"
echo e >> "x/normal"
git add "x/normal"
echo h >> "8 1/8.txt"
git add "8 1/8.txt"
git commit -m "Edit files"
git diff master~1 > 1.diff

             reply	other threads:[~2016-03-04 23:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 23:50 乙酸鋰 [this message]
2016-03-05  0:32 ` Diff filename has trailing tab if filename contains space Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHtLG6TLAOA0hg897EntOjG1kJsZEmjDshc-yyO9zP27540AAg@mail.gmail.com \
    --to=ch3cooli@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).