<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/upload-pack.c, branch v2.3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-27T20:00:21Z</updated>
<entry>
<title>Merge branch 'jk/smart-http-hide-refs' into maint</title>
<updated>2015-03-27T20:00:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-27T20:00:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a730ea3c3aa8d09cd69d114ea4160049d9a4fd04'/>
<id>urn:sha1:a730ea3c3aa8d09cd69d114ea4160049d9a4fd04</id>
<content type='text'>
The transfer.hiderefs support did not quite work for smart-http
transport.

* jk/smart-http-hide-refs:
  upload-pack: do not check NULL return of lookup_unknown_object
  upload-pack: fix transfer.hiderefs over smart-http
</content>
</entry>
<entry>
<title>upload-pack: do not check NULL return of lookup_unknown_object</title>
<updated>2015-03-13T06:21:16Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-03-13T04:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ddf3ca74f40bebd79cedba5ba82ca9f2eb33860'/>
<id>urn:sha1:8ddf3ca74f40bebd79cedba5ba82ca9f2eb33860</id>
<content type='text'>
We check whether the return value of lookup_unknown_object
is NULL, but some code paths dereference it before our
check. This turns out not to be capable of causing a
segfault, though. The lookup_unknown_object function will
never return NULL, since the whole point is to allocate an
object struct if it does not find an existing one. So the
code here is not wrong, it is just confusing. Let's just
drop the NULL check.

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>upload-pack: fix transfer.hiderefs over smart-http</title>
<updated>2015-03-13T06:18:33Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-03-13T04:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e172755b1eeb061c8fafb5ae8e4e9e72f68a0cdd'/>
<id>urn:sha1:e172755b1eeb061c8fafb5ae8e4e9e72f68a0cdd</id>
<content type='text'>
When upload-pack advertises the refs (either for a normal,
non-stateless request, or for the initial contact in a
stateless one), we call for_each_ref with the send_ref
function as its callback. send_ref, in turn, calls
mark_our_ref, which checks whether the ref is hidden, and
sets OUR_REF or HIDDEN_REF on the object as appropriate.  If
it is hidden, mark_our_ref also returns "1" to signal
send_ref that the ref should not be advertised.

If we are not advertising refs, (i.e., the follow-up
invocation by an http client to send its "want" lines), we
use mark_our_ref directly as a callback to for_each_ref. Its
marking does the right thing, but when it then returns "1"
to for_each_ref, the latter interprets this as an error and
stops iterating. As a result, we skip marking all of the
refs that come lexicographically after it. Any "want" lines
from the client asking for those objects will fail, as they
were not properly marked with OUR_REF.

To solve this, we introduce a wrapper callback around
mark_our_ref which always returns 0 (even if the ref is
hidden, we want to keep iterating). We also tweak the
signature of mark_our_ref to exclude unnecessary parameters
that were present only to conform to the callback interface.
This should make it less likely for somebody to accidentally
use it as a callback in the future.

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>pack-objects: use --objects-edge-aggressive for shallow repos</title>
<updated>2014-12-29T17:58:25Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2014-12-24T23:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2dacf26d0985521c0f30e535963a45257b63ea21'/>
<id>urn:sha1:2dacf26d0985521c0f30e535963a45257b63ea21</id>
<content type='text'>
When fetching into or pushing from a shallow repository, we want to
aggressively mark edges as uninteresting, since this decreases the pack
size.  However, aggressively marking edges can negatively affect
performance on large non-shallow repositories with lots of refs.

Teach pack-objects a --shallow option to indicate that we're pushing
from or fetching into a shallow repository.  Use
--objects-edge-aggressive only for shallow repositories and otherwise
use --objects-edge, which performs better in the general case.  Update
the callers to pass the --shallow option when they are dealing with a
shallow repository.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs.c: change resolve_ref_unsafe reading argument to be a flags field</title>
<updated>2014-10-15T17:47:24Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-07-15T19:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7695d118e5a3c9c6fcb4cb15eb766a1c57422aed'/>
<id>urn:sha1:7695d118e5a3c9c6fcb4cb15eb766a1c57422aed</id>
<content type='text'>
resolve_ref_unsafe takes a boolean argument for reading (a nonexistent ref
resolves successfully for writing but not for reading).  Change this to be
a flags field instead, and pass the new constant RESOLVE_REF_READING when
we want this behaviour.

While at it, swap two of the arguments in the function to put output
arguments at the end.  As a nice side effect, this ensures that we can
catch callers that were unaware of the new API so they can be audited.

Give the wrapper functions resolve_refdup and read_ref_full the same
treatment for consistency.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'et/spell-poll-infinite-with-minus-one-only' into maint</title>
<updated>2014-09-19T21:05:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-19T21:05:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b8f7239058e6f7c8bb68bd4276ff797d83e03229'/>
<id>urn:sha1:b8f7239058e6f7c8bb68bd4276ff797d83e03229</id>
<content type='text'>
* et/spell-poll-infinite-with-minus-one-only:
  upload-pack: keep poll(2)'s timeout to -1
</content>
</entry>
<entry>
<title>Merge branch 'et/spell-poll-infinite-with-minus-one-only'</title>
<updated>2014-09-11T17:33:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-11T17:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ddd68973a946213a4607d6610e8a2b7ef5b19c0'/>
<id>urn:sha1:9ddd68973a946213a4607d6610e8a2b7ef5b19c0</id>
<content type='text'>
We used to pass -1000 to poll(2), expecting it to also mean "no
timeout", which should be spelled as -1.

* et/spell-poll-infinite-with-minus-one-only:
  upload-pack: keep poll(2)'s timeout to -1
</content>
</entry>
<entry>
<title>upload-pack: keep poll(2)'s timeout to -1</title>
<updated>2014-08-22T18:19:47Z</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2014-08-22T15:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6c71f8b0d3d39beffe050f92f33a25dc30dffca3'/>
<id>urn:sha1:6c71f8b0d3d39beffe050f92f33a25dc30dffca3</id>
<content type='text'>
Keep poll's timeout at -1 when uploadpack.keepalive = 0, instead of
setting it to -1000, since some pedantic old systems (eg HP-UX) and
the gnulib compat/poll will treat only -1 as the valid value for
an infinite timeout.

Signed-off-by: Edward Thomson &lt;ethomson@microsoft.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: introduce CHILD_PROCESS_INIT</title>
<updated>2014-08-20T16:53:37Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-08-19T19:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3180279322c7450a47decf8833de47f444ca93f'/>
<id>urn:sha1:d3180279322c7450a47decf8833de47f444ca93f</id>
<content type='text'>
Most struct child_process variables are cleared using memset first after
declaration.  Provide a macro, CHILD_PROCESS_INIT, that can be used to
initialize them statically instead.  That's shorter, doesn't require a
function call and is slightly more readable (especially given that we
already have STRBUF_INIT, ARGV_ARRAY_INIT etc.).

Helped-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/log-show-linear-break'</title>
<updated>2014-04-03T19:38:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-03T19:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b407d40933f9c37af16ca3dc275e615ab4fdd8c5'/>
<id>urn:sha1:b407d40933f9c37af16ca3dc275e615ab4fdd8c5</id>
<content type='text'>
Attempts to show where a single-strand-of-pearls break in "git log"
output.

* nd/log-show-linear-break:
  log: add --show-linear-break to help see non-linear history
  object.h: centralize object flag allocation
</content>
</entry>
</feed>
