From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [RFH] plumber's puzzle
Date: Sun, 22 Apr 2007 12:53:37 -0700 [thread overview]
Message-ID: <7v647ombi6.fsf@assigned-by-dhcp.cox.net> (raw)
I know people had trouble fetching from the official git.git
repository this morning; sorry about the gotcha.
Now it has all been hopefully sorted out, here is one thing that
I have been having trouble with lately, and can use some help.
Please try this, after getting the latest 'pu':
$ git checkout origin/pu
$ make all test-chmtime
$ cd t
$ sh ./t0021-filter.sh
$ cd trash
$ rm -f test.t
$ ../../git-checkout-index -f -q -a
$ ../../git-diff
This shows the single "diff --git" header line without anything,
to show that the path is not stat-clean, but the contents are
unchanged, which is what is expected.
A bit of background. test.t has a funny "rot13" filter set for
both smudge and clean. So test.t file has "a b c d e...", but
the actual blob records "n o p q r...". Since we teached git
about the filter, git-checkout-index and git-diff do the right
thing.
Now, go back to the toplevel, comment out "close(1)" in
convert.c::filter_buffer() around line 236, and rebuild.
$ cd ../..
$ edit convert.c ;# comment out "close(1)"
$ make
$ cd t/trash
We get a quite _WRONG_ diff, like this:
$ ../../git-diff
diff --git a/test.t b/test.t
--- a/test.t
+++ b/test.t
@@ -1,3 +1,4 @@
n o p q r s t u v w x y z
a b c d e f g h i j k l m
$vqrag$
+diff --git a/test.t b/test.t
and if you disable pager like this:
$ PAGER= ../../git-diff
then you get the expected correct result. Also you get this if
we disable the internal pager:
$ ../../git-diff | cat
diff --git a/test.t b/test.t
--- a/test.t
+++ b/test.t
@@ -1,3 +1,4 @@
n o p q r s t u v w x y z
a b c d e f g h i j k l m
$vqrag$
+diff --git a/test.t b/test.t
I do not want to have a "fix" that I do not understand *why* it
fixes things in the tree; I couldn't figure out why that
close(1) in that codepath matters, although I was the one who
added that line.
Insights?
next reply other threads:[~2007-04-22 19:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-22 19:53 Junio C Hamano [this message]
2007-04-22 20:30 ` [RFH] plumber's puzzle Florian Weimer
2007-04-22 20:43 ` Linus Torvalds
2007-04-22 22:34 ` Junio C Hamano
2007-04-22 23:03 ` Linus Torvalds
2007-04-22 23:52 ` Junio C Hamano
2007-04-24 0:51 ` H. Peter Anvin
2007-04-24 8:36 ` 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=7v647ombi6.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.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 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).