<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git, branch nd/optim-connected</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>{fetch,receive}-pack: skip sha-1 integrity test on objects from new pack</title>
<updated>2012-03-15T18:29:32+00:00</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-03-14T14:40:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=752661636262ef92f1d69ccd36fd651599805fcc'/>
<id>752661636262ef92f1d69ccd36fd651599805fcc</id>
<content type='text'>
When we fetch or push, usually "git rev-list --verify-objects --not
--all --stdin" is used to make sure that all objects between existing
refs and new refs are good. This means no gaps in between, all objects
are well-formed, object content agrees with its sha-1 signature.

For the last one, --verify-objects calls check_sha1_signature() via
parse_object(). check_sha1_signature() is an expensive operation,
especially when new refs are far away from existing ones because all
objects in between are re-hashed. Because objects coming from the new
pack are already hashed by index-pack, we can trust their
integrity. The only objects left to check are existing ones in repo
but has no connection to any current refs.

Pass the new pack id down to--verify-objects and skip
check_sha1_signature() on objects from that pack.

As an (extreme) example, a repository is created with only one commit:
e83c516 (Initial revision of "git", the information manager from hell
- 2005-04-07). The rest of git.git is fetched on top. Without the
patch:

$ time git fetch file:///home/pclouds/w/git/.git
remote: Counting objects: 125656, done.
remote: Compressing objects: 100% (33280/33280), done.
remote: Total 125656 (delta 92585), reused 123464 (delta 90682)
Receiving objects: 100% (125656/125656), 34.60 MiB | 8.47 MiB/s, done.
Resolving deltas: 100% (92585/92585), done.
&gt;From file:///home/pclouds/t/test/
 * branch            HEAD       -&gt; FETCH_HEAD

real    1m30.437s
user    1m31.338s
sys     0m1.687s

With the patch:

$ time git fetch file:///home/pclouds/w/git/.git
remote: Counting objects: 125656, done.
remote: Compressing objects: 100% (33280/33280), done.
remote: Total 125656 (delta 92585), reused 123464 (delta 90682)
Receiving objects: 100% (125656/125656), 34.60 MiB | 7.86 MiB/s, done.
Resolving deltas: 100% (92585/92585), done.
&gt;From file:///home/pclouds/t/test/
 * branch            HEAD       -&gt; FETCH_HEAD

real    0m52.182s
user    0m53.151s
sys     0m1.465s

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we fetch or push, usually "git rev-list --verify-objects --not
--all --stdin" is used to make sure that all objects between existing
refs and new refs are good. This means no gaps in between, all objects
are well-formed, object content agrees with its sha-1 signature.

For the last one, --verify-objects calls check_sha1_signature() via
parse_object(). check_sha1_signature() is an expensive operation,
especially when new refs are far away from existing ones because all
objects in between are re-hashed. Because objects coming from the new
pack are already hashed by index-pack, we can trust their
integrity. The only objects left to check are existing ones in repo
but has no connection to any current refs.

Pass the new pack id down to--verify-objects and skip
check_sha1_signature() on objects from that pack.

As an (extreme) example, a repository is created with only one commit:
e83c516 (Initial revision of "git", the information manager from hell
- 2005-04-07). The rest of git.git is fetched on top. Without the
patch:

$ time git fetch file:///home/pclouds/w/git/.git
remote: Counting objects: 125656, done.
remote: Compressing objects: 100% (33280/33280), done.
remote: Total 125656 (delta 92585), reused 123464 (delta 90682)
Receiving objects: 100% (125656/125656), 34.60 MiB | 8.47 MiB/s, done.
Resolving deltas: 100% (92585/92585), done.
&gt;From file:///home/pclouds/t/test/
 * branch            HEAD       -&gt; FETCH_HEAD

real    1m30.437s
user    1m31.338s
sys     0m1.687s

With the patch:

$ time git fetch file:///home/pclouds/w/git/.git
remote: Counting objects: 125656, done.
remote: Compressing objects: 100% (33280/33280), done.
remote: Total 125656 (delta 92585), reused 123464 (delta 90682)
Receiving objects: 100% (125656/125656), 34.60 MiB | 7.86 MiB/s, done.
Resolving deltas: 100% (92585/92585), done.
&gt;From file:///home/pclouds/t/test/
 * branch            HEAD       -&gt; FETCH_HEAD

real    0m52.182s
user    0m53.151s
sys     0m1.465s

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Git 1.7.9.4</title>
<updated>2012-03-12T22:52:52+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-12T22:52:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=a46034819ecce6872bff099f3d75589f4d38c00c'/>
<id>a46034819ecce6872bff099f3d75589f4d38c00c</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'tr/maint-bundle-boundary' into maint</title>
<updated>2012-03-12T22:46:54+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-12T22:46:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=92b7aacbbc654de4cfae6806bc92cf81ec1823aa'/>
<id>92b7aacbbc654de4cfae6806bc92cf81ec1823aa</id>
<content type='text'>
"git bundle" did not record boundary commits correctly when there
are many of them.

By Thomas Rast
* tr/maint-bundle-boundary:
  bundle: keep around names passed to add_pending_object()
  t5510: ensure we stay in the toplevel test dir
  t5510: refactor bundle-&gt;pack conversion
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"git bundle" did not record boundary commits correctly when there
are many of them.

By Thomas Rast
* tr/maint-bundle-boundary:
  bundle: keep around names passed to add_pending_object()
  t5510: ensure we stay in the toplevel test dir
  t5510: refactor bundle-&gt;pack conversion
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-diff-patch-header' into maint</title>
<updated>2012-03-12T22:46:32+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-12T22:46:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=fce8b5d82fadd0bc27b12ae91bf7ad74d6488e97'/>
<id>fce8b5d82fadd0bc27b12ae91bf7ad74d6488e97</id>
<content type='text'>
"git diff-index" and its friends at the plumbing level showed the
"diff --git" header and nothing else for a path whose cached stat
info is dirty without actual difference when asked to produce a
patch. This was a longstanding bug that we could have fixed long
time ago.

By Junio C Hamano
* jc/maint-diff-patch-header:
  diff -p: squelch "diff --git" header for stat-dirty paths
  t4011: illustrate "diff-index -p" on stat-dirty paths
  t4011: modernise style
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"git diff-index" and its friends at the plumbing level showed the
"diff --git" header and nothing else for a path whose cached stat
info is dirty without actual difference when asked to produce a
patch. This was a longstanding bug that we could have fixed long
time ago.

By Junio C Hamano
* jc/maint-diff-patch-header:
  diff -p: squelch "diff --git" header for stat-dirty paths
  t4011: illustrate "diff-index -p" on stat-dirty paths
  t4011: modernise style
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jn/maint-do-not-match-with-unsanitized-searchtext' into maint</title>
<updated>2012-03-12T22:45:58+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-12T22:45:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=f629c233e6dd72924ed2672db142708b71dc663e'/>
<id>f629c233e6dd72924ed2672db142708b71dc663e</id>
<content type='text'>
"gitweb" did use quotemeta() to prepare search string when asked to
do a fixed-string project search, but did not use it by mistake and
used the user-supplied string instead.

By Jakub Narebski
* jn/maint-do-not-match-with-unsanitized-searchtext:
  gitweb: Fix fixed string (non-regexp) project search
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"gitweb" did use quotemeta() to prepare search string when asked to
do a fixed-string project search, but did not use it by mistake and
used the user-supplied string instead.

By Jakub Narebski
* jn/maint-do-not-match-with-unsanitized-searchtext:
  gitweb: Fix fixed string (non-regexp) project search
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/am-3-nonstandard-popt' into maint</title>
<updated>2012-03-12T22:43:15+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-12T22:43:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=b91a13bbdca0095b1dc9ffb06bcb5caf4aab56b6'/>
<id>b91a13bbdca0095b1dc9ffb06bcb5caf4aab56b6</id>
<content type='text'>
The code to synthesize the fake ancestor tree used by 3-way merge
fallback in "git am" was not prepared to read a patch created with
a non-standard -p&lt;num&gt; value.

* jc/am-3-nonstandard-popt:
  test: "am -3" can accept non-standard -p&lt;num&gt;
  am -3: allow nonstandard -p&lt;num&gt; option
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code to synthesize the fake ancestor tree used by 3-way merge
fallback in "git am" was not prepared to read a patch created with
a non-standard -p&lt;num&gt; value.

* jc/am-3-nonstandard-popt:
  test: "am -3" can accept non-standard -p&lt;num&gt;
  am -3: allow nonstandard -p&lt;num&gt; option
</pre>
</div>
</content>
</entry>
<entry>
<title>gitweb: Fix fixed string (non-regexp) project search</title>
<updated>2012-03-06T22:48:24+00:00</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2012-03-02T22:34:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=e65ceb61cd7d3fabedea8cb545f8c210b48552d4'/>
<id>e65ceb61cd7d3fabedea8cb545f8c210b48552d4</id>
<content type='text'>
Use $search_regexp, where regex metacharacters are quoted, for
searching projects list, rather than $searchtext, which contains
original search term.

Reported-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use $search_regexp, where regex metacharacters are quoted, for
searching projects list, rather than $searchtext, which contains
original search term.

Reported-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t5704: fix nonportable sed/grep usages</title>
<updated>2012-03-06T20:32:24+00:00</updated>
<author>
<name>Thomas Rast</name>
<email>trast@inf.ethz.ch</email>
</author>
<published>2012-03-06T14:50:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=0dbe6592ccbd1a394a69a52074e3729d546fe952'/>
<id>0dbe6592ccbd1a394a69a52074e3729d546fe952</id>
<content type='text'>
OS X's sed and grep would complain with (respectively)

  sed: 1: "/^-/{p;q}": extra characters at the end of q command
  grep: Regular expression too big

For sed, use an explicit ; to terminate the q command.

For grep, spell the "40 hex digits" explicitly in the regex, which
should be safe as other tests already use this and we haven't got
breakage reports on OS X about them.

Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OS X's sed and grep would complain with (respectively)

  sed: 1: "/^-/{p;q}": extra characters at the end of q command
  grep: Regular expression too big

For sed, use an explicit ; to terminate the q command.

For grep, spell the "40 hex digits" explicitly in the regex, which
should be safe as other tests already use this and we haven't got
breakage reports on OS X about them.

Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.7.8' into maint</title>
<updated>2012-03-06T20:05:09+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-06T20:05:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=80a3f53424b2e3d6d7b9463dbd3faa888ced947f'/>
<id>80a3f53424b2e3d6d7b9463dbd3faa888ced947f</id>
<content type='text'>
By Thomas Rast
* maint-1.7.8:
  Document the --histogram diff option
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By Thomas Rast
* maint-1.7.8:
  Document the --histogram diff option
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.7.7' into maint-1.7.8</title>
<updated>2012-03-06T20:04:48+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-06T20:04:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=e521850bfd4aa79632c99293a39dad56bcaa4143'/>
<id>e521850bfd4aa79632c99293a39dad56bcaa4143</id>
<content type='text'>
By Thomas Rast
* maint-1.7.7:
  Document the --histogram diff option
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By Thomas Rast
* maint-1.7.7:
  Document the --histogram diff option
</pre>
</div>
</content>
</entry>
</feed>
