<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.c, branch v2.2.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-10-15T17:47:24Z</updated>
<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>remote: simplify match_name_with_pattern() using strbuf</title>
<updated>2014-09-22T19:40:27Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-09-21T08:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07bfa575c1ce741d0e33580c336596d3407129b6'/>
<id>urn:sha1:07bfa575c1ce741d0e33580c336596d3407129b6</id>
<content type='text'>
Make the code simpler and shorter by avoiding repetitive use of
string length variables and leaving memory allocation to strbuf
functions.

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 'sb/prepare-revision-walk-error-check'</title>
<updated>2014-09-09T19:54:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-09T19:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=715b63ceb3c71fb748ec1e46680d96e025e9c75d'/>
<id>urn:sha1:715b63ceb3c71fb748ec1e46680d96e025e9c75d</id>
<content type='text'>
* sb/prepare-revision-walk-error-check:
  prepare_revision_walk(): check for return value in all places
</content>
</entry>
<entry>
<title>Merge branch 'sb/plug-leaks'</title>
<updated>2014-09-09T19:54:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-09T19:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27fbcf8267ecc484cafdbfe84a3aaf2f373f3e2a'/>
<id>urn:sha1:27fbcf8267ecc484cafdbfe84a3aaf2f373f3e2a</id>
<content type='text'>
* sb/plug-leaks:
  clone.c: don't leak memory in cmd_clone
  remote.c: don't leak the base branch name in format_tracking_info
</content>
</entry>
<entry>
<title>prepare_revision_walk(): check for return value in all places</title>
<updated>2014-08-12T18:00:33Z</updated>
<author>
<name>Stefan Beller</name>
<email>stefanbeller@gmail.com</email>
</author>
<published>2014-08-10T21:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c'/>
<id>urn:sha1:81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c</id>
<content type='text'>
Even the documentation tells us:

	You should check if it returns any error (non-zero return
	code) and if it does not, you can start using get_revision()
	to do the iteration.

In preparation for this commit, I grepped all occurrences of
prepare_revision_walk and added error messages, when there were none.

Signed-off-by: Stefan Beller &lt;stefanbeller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote.c: don't leak the base branch name in format_tracking_info</title>
<updated>2014-08-10T23:40:54Z</updated>
<author>
<name>Stefan Beller</name>
<email>stefanbeller@gmail.com</email>
</author>
<published>2014-08-10T19:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f50babef18db3ca90b0b75f54d9c36d7a9142b3'/>
<id>urn:sha1:2f50babef18db3ca90b0b75f54d9c36d7a9142b3</id>
<content type='text'>
Found by scan.coverity.com (Id: 1127809)

Signed-off-by: Stefan Beller &lt;stefanbeller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use a hashmap to make remotes faster</title>
<updated>2014-07-30T18:29:33Z</updated>
<author>
<name>Patrick Reynolds</name>
<email>patrick.reynolds@github.com</email>
</author>
<published>2014-07-29T14:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0da003d5b1e65f6e52920e42582f43b357782ee'/>
<id>urn:sha1:d0da003d5b1e65f6e52920e42582f43b357782ee</id>
<content type='text'>
Remotes are stored as an array, so looking one up or adding one without
duplication is an O(n) operation.  Reading an entire config file full of
remotes is O(n^2) in the number of remotes.  For a repository with tens of
thousands of remotes, the running time can hit multiple minutes.

Hash tables are way faster.  So we add a hashmap from remote name to
struct remote and use it for all lookups.  The time to add a new remote to
a repo that already has 50,000 remotes drops from ~2 minutes to &lt; 1
second.

We retain the old array of remotes so iterators proceed in config-file
order.

Signed-off-by: Patrick Reynolds &lt;patrick.reynolds@github.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/xstrfmt'</title>
<updated>2014-07-09T18:34:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-09T18:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b8e8af187cb86ed030432f1a067121fdd4b1c3b'/>
<id>urn:sha1:3b8e8af187cb86ed030432f1a067121fdd4b1c3b</id>
<content type='text'>
* jk/xstrfmt:
  setup_git_env(): introduce git_path_from_env() helper
  unique_path: fix unlikely heap overflow
  walker_fetch: fix minor memory leak
  merge: use argv_array when spawning merge strategy
  sequencer: use argv_array_pushf
  setup_git_env: use git_pathdup instead of xmalloc + sprintf
  use xstrfmt to replace xmalloc + strcpy/strcat
  use xstrfmt to replace xmalloc + sprintf
  use xstrdup instead of xmalloc + strcpy
  use xstrfmt in favor of manual size calculations
  strbuf: add xstrfmt helper
</content>
</entry>
<entry>
<title>Merge branch 'jk/skip-prefix'</title>
<updated>2014-07-09T18:33:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-09T18:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e91ae32a01ffe294b8510c1d8cd7138493a0712f'/>
<id>urn:sha1:e91ae32a01ffe294b8510c1d8cd7138493a0712f</id>
<content type='text'>
* jk/skip-prefix:
  http-push: refactor parsing of remote object names
  imap-send: use skip_prefix instead of using magic numbers
  use skip_prefix to avoid repeated calculations
  git: avoid magic number with skip_prefix
  fetch-pack: refactor parsing in get_ack
  fast-import: refactor parsing of spaces
  stat_opt: check extra strlen call
  daemon: use skip_prefix to avoid magic numbers
  fast-import: use skip_prefix for parsing input
  use skip_prefix to avoid repeating strings
  use skip_prefix to avoid magic numbers
  transport-helper: avoid reading past end-of-string
  fast-import: fix read of uninitialized argv memory
  apply: use skip_prefix instead of raw addition
  refactor skip_prefix to return a boolean
  avoid using skip_prefix as a boolean
  daemon: mark some strings as const
  parse_diff_color_slot: drop ofs parameter
</content>
</entry>
<entry>
<title>Merge branch 'rs/more-starts-with'</title>
<updated>2014-06-20T20:12:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-20T20:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa8203741e37d9d37098bfe260d7040e70f11023'/>
<id>urn:sha1:fa8203741e37d9d37098bfe260d7040e70f11023</id>
<content type='text'>
* rs/more-starts-with:
  Use starts_with() for C strings instead of memcmp()
</content>
</entry>
</feed>
