All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Bernd Jendrissek <bernd.jendrissek@gmail.com>
Cc: Thomas Rast <trast@student.ethz.ch>, <git@vger.kernel.org>
Subject: Re: git diff vs git diff-files
Date: Tue, 14 Aug 2012 11:55:39 +0200	[thread overview]
Message-ID: <87393pztk4.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <CAF7PVPq0Wjck+53G4=Ofz0drMdx9NtpfgzMFR4j=32N-ez2xBg@mail.gmail.com> (Bernd Jendrissek's message of "Tue, 14 Aug 2012 11:15:26 +0200")

Bernd Jendrissek <bernd.jendrissek@gmail.com> writes:

> On Tue, Aug 14, 2012 at 10:18 AM, Thomas Rast <trast@student.ethz.ch> wrote:
>> Can you try the following:
>>
>>   git ls-files --debug gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
>>   cp .git/index .git/index.orig
>>   touch gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
>>   # note, it is important that you run diff first
>>   git diff gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
>>   git diff-files -p gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
>>   git ls-files --debug gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
>
> I'm can't tell what this was supposed to prove, but I think it's
> proven that I'm in the wrong mailing list, and that I should be taking
> this up with gnome-terminal. The Q1 part deletion line seems to be
> appearing (in the terminal) only after I've copy&pasted it into
> another terminal.
>
> Running the same commands in xterm (correctly) shows the Q1 part
> deletion line without having to copy & paste.

Fun stuff.  This will be very interesting to debug.  It's still
possible, though perhaps not extremely likely, that git is writing
garbage to the terminal and it just happens to work for xterm.

Whatever you do next, *please* post the *exact* file contents *and*
output in a format that does not suffer any transport damage, neither to
whitespace nor to binary data (such as terminal escapes).  Piping
through xxd comes to mind, perhaps by using

  GIT_PAGER=xxd git -p diff ....  >diff-hexdump

etc. to ensure that git takes the same code paths as when writing to
less.

Cut&paste from a terminal will at best give you exactly what the
terminal figures it is *currently displaying*, which is completely
different from what programs write to it.  At worst, it will also suffer
whitespace damage.  So pretty much everything you showed so far, except
for the raw data of one (why only one?!) side of the diff, is useless.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2012-08-14  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13  8:55 git diff vs git diff-files Bernd Jendrissek
2012-08-13 15:02 ` Thomas Rast
2012-08-13 16:06   ` Bernd Jendrissek
2012-08-14  8:18     ` Thomas Rast
2012-08-14  9:15       ` Bernd Jendrissek
2012-08-14  9:55         ` Thomas Rast [this message]
2012-08-14 11:09           ` Andreas Schwab
2012-08-14 13:11           ` Bernd Jendrissek
2012-08-13 15:13 ` Matthieu Moy

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=87393pztk4.fsf@thomas.inf.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=bernd.jendrissek@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.