From: Matthias Lederhofer <matled@gmx.net>
To: git@vger.kernel.org
Subject: [BUG] diff -B does not (always?) use colors
Date: Tue, 20 Feb 2007 11:08:46 +0100 [thread overview]
Message-ID: <20070220100846.GA7928@moooo.ath.cx> (raw)
I found that git diff -B does not always use colors and I don't have
time to figure out what it is atm.
The bug can be triggered by this two files and running git diff with
-B. You can also just clone the repository from
git://igit.ath.cx/~matled/tmp/break/
% git cat-file -p HEAD~1:test
def test(p)
if p
Array.new
Array.new(2)
Array.new(5, "A")
# only one copy of the object is created
a = Array.new(2, Hash.new)
a[0]['cat'] = 'feline'
a
a[1]['cat'] = 'Felix'
a
# here multiple copies are created
a = Array.new(2) { Hash.new }
a[0]['cat'] = 'feline'
a
squares = Array.new(5) {|i| i*i}
squares
copy = Array.new(squares)
end
end
% git cat-file -p HEAD:test
def test(p)
test_bla if p
end
def test_bla
Array.new
Array.new(2)
Array.new(5, "A")
# only one copy of the object is created
a = Array.new(2, Hash.new)
a[0]['cat'] = 'feline'
a
a[1]['cat'] = 'Felix'
a
# here multiple copies are created
a = Array.new(2) { Hash.new }
a[0]['cat'] = 'feline'
a
squares = Array.new(5) {|i| i*i}
squares
copy = Array.new(squares)
end
next reply other threads:[~2007-02-20 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 10:08 Matthias Lederhofer [this message]
2007-02-20 14:08 ` [PATCH] Teach diff -B about colours Johannes Schindelin
2007-02-20 18:22 ` Junio C Hamano
2007-02-20 18:35 ` Johannes Schindelin
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=20070220100846.GA7928@moooo.ath.cx \
--to=matled@gmx.net \
--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.