<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/t/t4012-diff-binary.sh, branch v1.7.6.3</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-07-19T19:04:47Z</updated>
<entry>
<title>tests: cleanup binary test vector files</title>
<updated>2011-07-19T19:04:47Z</updated>
<author>
<name>Vitaliy Ivanov</name>
<email>vitalivanov@gmail.com</email>
</author>
<published>2011-07-19T17:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b5967f820c9774285ec4380e77d5356c3cd6eb99'/>
<id>urn:sha1:b5967f820c9774285ec4380e77d5356c3cd6eb99</id>
<content type='text'>
The test4012.png test vector file that was originally used for t4012 to
check operations on binary files was later reused in other tests, making
it no longer consistent to name it after a specific test. Rename it to more
generic "test-binary-1.png".

While at it, rename test9200b to "test-binary-2.png" (even though it is
only used by t9200).

Signed-off-by: Vitaliy Ivanov &lt;vitalivanov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rev-list: handle %x00 NUL in user format</title>
<updated>2010-10-14T01:58:33Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-10-07T18:25:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9130ac9fe17831445690ebbb60f09b86f96516b3'/>
<id>urn:sha1:9130ac9fe17831445690ebbb60f09b86f96516b3</id>
<content type='text'>
The code paths for showing commits in "git log" and "git
rev-list --graph" correctly handle embedded NULs by looking
only at the resulting strbuf's length, and never treating it
as a C string. The code path for regular rev-list, however,
used printf("%s"), which resulted in truncated output. This
patch uses fwrite instead, like the --graph code path.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: consolidate CR removal/addition functions</title>
<updated>2010-01-26T00:42:23Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2010-01-26T00:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c4f3f551a61e138f8ace9523d6b16aff37b30302'/>
<id>urn:sha1:c4f3f551a61e138f8ace9523d6b16aff37b30302</id>
<content type='text'>
append_cr(), remove_cr(), q_to_nul() and q_to_cr() are defined in multiple
tests. Consolidate them into test-lib.sh so we can stop redefining them.
The use of remove_cr() in t0020 to test for a CR is replaced with a new
function has_cr() to accurately reflect what is intended (the output of
remove_cr() was being thrown away).

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>MinGW: fix diff --no-index /dev/null ...</title>
<updated>2009-03-08T04:36:16Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2009-03-07T15:51:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=36adb4abbdf809371b88581c8bf7fe9ea9a5b00a'/>
<id>urn:sha1:36adb4abbdf809371b88581c8bf7fe9ea9a5b00a</id>
<content type='text'>
When launching "diff --no-index" with a parameter "/dev/null", the MSys
bash converts the "/dev/null" to a "nul", which usually makes sense.  But

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4012: use test_cmp instead of cmp</title>
<updated>2008-10-18T14:20:36Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2008-10-05T21:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e7881c3594d22eb711654d2febfd577dc4994f34'/>
<id>urn:sha1:e7881c3594d22eb711654d2febfd577dc4994f34</id>
<content type='text'>
This makes erroneous output slightly easier to see. We also
flip the argument order to match our usual style.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2008-10-06T15:56:07Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-10-06T15:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=276328ffb87cefdc515bee5f09916aea6e0244ed'/>
<id>urn:sha1:276328ffb87cefdc515bee5f09916aea6e0244ed</id>
<content type='text'>
* maint:
  Update release notes for 1.6.0.3
  Teach rebase -i to honor pre-rebase hook
  docs: describe pre-rebase hook
  do not segfault if make_cache_entry failed
  make prefix_path() never return NULL
  fix bogus "diff --git" header from "diff --no-index"
  Fix fetch/clone --quiet when stdout is connected
  builtin-blame: Fix blame -C -C with submodules.
  bash: remove fetch, push, pull dashed form leftovers

Conflicts:
	diff.c
</content>
</entry>
<entry>
<title>fix bogus "diff --git" header from "diff --no-index"</title>
<updated>2008-10-06T07:29:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-10-05T19:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=71b989e7dd1dcf891369319cfeda0ed8b6a152e1'/>
<id>urn:sha1:71b989e7dd1dcf891369319cfeda0ed8b6a152e1</id>
<content type='text'>
When "git diff --no-index" is given an absolute pathname, it
would generate a diff header with the absolute path
prepended by the prefix, like:

  diff --git a/dev/null b/foo

Not only is this nonsensical, and not only does it violate
the description of diffs given in git-diff(1), but it would
produce broken binary diffs. Unlike text diffs, the binary
diffs don't contain the filenames anywhere else, and so "git
apply" relies on this header to figure out the filename.

This patch just refuses to use an invalid name for anything
visible in the diff.

Now, this fixes the "git diff --no-index --binary a
/dev/null" kind of case (and we'll end up using "a" as the
basename), but some other insane cases are impossible to
handle. If you do

	git diff --no-index --binary a /bin/echo

you'll still get a patch like

	diff --git a/a b/bin/echo
	old mode 100644
	new mode 100755
	index ...

and "git apply" will refuse to apply it for a couple of
reasons, and the diff is simply bogus.

And that, btw, is no longer a bug, I think. It's impossible
to know whethe the user meant for the patch to be a rename
or not. And as such, refusing to apply it because you don't
know what name you should use is probably _exactly_ the
right thing to do!

Original problem reported by Imre Deak. Test script and problem
description by Jeff King.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2008-09-03T23:08:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-09-03T23:08:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9b8ae93ad92efef59649a3a7c4bed162d2051059'/>
<id>urn:sha1:9b8ae93ad92efef59649a3a7c4bed162d2051059</id>
<content type='text'>
* maint:
  Start 1.6.0.2 maintenance cycle
  tests: use "git xyzzy" form (t7200 - t9001)
  tests: use "git xyzzy" form (t7000 - t7199)
  Fix passwd(5) ref and reflect that commit doens't use commit-tree
  improve handling of sideband message display
  tests: use "git xyzzy" form (t3600 - t6999)
  tests: use "git xyzzy" form (t0000 - t3599)
  checkout: fix message when leaving detached HEAD
  clone: fix creation of explicitly named target directory
  'git foo' program identifies itself without dash in die() messages
  setup_git_directory(): fix move to worktree toplevel directory
  update-index: fix worktree setup
  Start conforming code to "git subcmd" style
  read-tree: setup worktree if merge is required
  grep: fix worktree setup
  diff*: fix worktree setup

Conflicts:
	RelNotes
	t/t3900-i18n-commit.sh
	t/t7003-filter-branch.sh
</content>
</entry>
<entry>
<title>tests: use "git xyzzy" form (t3600 - t6999)</title>
<updated>2008-09-03T21:13:59Z</updated>
<author>
<name>Nanako Shiraishi</name>
<email>nanako3@lavabit.com</email>
</author>
<published>2008-09-03T08:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3604e7c5c6f8d48e221ea5b21ef26fc3e27eff9e'/>
<id>urn:sha1:3604e7c5c6f8d48e221ea5b21ef26fc3e27eff9e</id>
<content type='text'>
Converts tests between t3600-t6300.

Signed-off-by: Nanako Shiraishi &lt;nanako3@lavabit.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: use $TEST_DIRECTORY to refer to the t/ directory</title>
<updated>2008-08-17T07:41:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-08T09:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=bfdbee98109c5ad2dbbc392e7eed1ae688acc039'/>
<id>urn:sha1:bfdbee98109c5ad2dbbc392e7eed1ae688acc039</id>
<content type='text'>
Many test scripts assumed that they will start in a 'trash' subdirectory
that is a single level down from the t/ directory, and referred to their
test vector files by asking for files like "../t9999/expect".  This will
break if we move the 'trash' subdirectory elsewhere.

To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can
refer to t/ directory reliably.  This finally makes all the tests use
it to refer to the outside environment.

With this patch, and a one-liner not included here (because it would
contradict with what Dscho really wants to do):

| diff --git a/t/test-lib.sh b/t/test-lib.sh
| index 70ea7e0..60e69e4 100644
| --- a/t/test-lib.sh
| +++ b/t/test-lib.sh
| @@ -485,7 +485,7 @@ fi
|  . ../GIT-BUILD-OPTIONS
|
|  # Test repository
| -test="trash directory"
| +test="trash directory/another level/yet another"
|  rm -fr "$test" || {
|         trap - exit
|         echo &gt;&amp;5 "FATAL: Cannot prepare test area"

all the tests still pass, but we would want extra sets of eyeballs on this
type of change to really make sure.

[jc: with help from Stephan Beyer on http-push tests I do not run myself;
 credits for locating silly quoting errors go to Olivier Marin.]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
