<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.c, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-05-17T21:38:24Z</updated>
<entry>
<title>Merge branch 'nd/remote-plural-ours-plus-theirs'</title>
<updated>2016-05-17T21:38:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-17T21:38:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a7d0854ff3cb1bc5b95e9295b9c11089d9a75a6'/>
<id>urn:sha1:7a7d0854ff3cb1bc5b95e9295b9c11089d9a75a6</id>
<content type='text'>
Message fix.

* nd/remote-plural-ours-plus-theirs:
  remote.c: specify correct plural form in "commit diverge" message
</content>
</entry>
<entry>
<title>remote.c: specify correct plural form in "commit diverge" message</title>
<updated>2016-05-06T19:52:58Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-05-03T00:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f54bea44a58caddaaf83644d95172740e8490206'/>
<id>urn:sha1:f54bea44a58caddaaf83644d95172740e8490206</id>
<content type='text'>
We need to count both "ours" and "theirs" commits when selecting plural
form for this message. Note that even though in this block, both ours
and theirs must be positive (i.e. can't be in singular form), we still
keep Q_(singular, plural) because languages other than English may have
more than one plural form.

Reported-by: Alfonsogonzalez, Ernesto (GE Digital) &lt;ernesto.alfonsogonzalez@ge.com&gt;
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>
</entry>
<entry>
<title>Merge branch 'jk/fix-attribute-macro-in-2.5'</title>
<updated>2016-05-03T21:08:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-03T21:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=643318913fc791790eb30a78531f7ae4eed7155d'/>
<id>urn:sha1:643318913fc791790eb30a78531f7ae4eed7155d</id>
<content type='text'>
Code fixup.

* jk/fix-attribute-macro-in-2.5:
  remote.c: spell __attribute__ correctly
</content>
</entry>
<entry>
<title>remote.c: spell __attribute__ correctly</title>
<updated>2016-04-25T22:32:23Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-04-25T21:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=060e7766ba34dc4fef351494239235ba365edd18'/>
<id>urn:sha1:060e7766ba34dc4fef351494239235ba365edd18</id>
<content type='text'>
We want to tell the compiler that error_buf() uses
printf()-style arguments via the __attribute__ mechanism,
but the original commit (3a429d0), forgot the trailing "__".
This happens to work with real GNUC-compatible compilers
like gcc and clang, but confuses our fallback macro in
git-compat-util.h, which only matches the official name (and
thus the build fails on compilers like Visual Studio).

Reported-by: Philip Oakley &lt;philipoakley@iee.org&gt;
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>remote: don't resolve HEAD in non-repository</title>
<updated>2016-03-07T01:18:40Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-03-05T22:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2f12d169aa607604edbd942675026174f061e3f'/>
<id>urn:sha1:f2f12d169aa607604edbd942675026174f061e3f</id>
<content type='text'>
The remote-config code wants to look at HEAD to mark the
current branch specially. But if we are not in a repository
(e.g., running "git archive --remote"), this makes no sense;
there is no HEAD to look at, and we have no current branch.

This doesn't really cause any bugs in practice (if you are
not in a repo, you probably don't have a .git/HEAD file),
but we should be more careful about triggering the refs code
at all in a non-repo. As we grow new ref backends, we would
not even know which backend to use.

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>Merge branch 'jk/tighten-alloc'</title>
<updated>2016-02-26T21:37:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-26T21:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11529ecec914d2f0d7575e6d443c2d5a6ff75424'/>
<id>urn:sha1:11529ecec914d2f0d7575e6d443c2d5a6ff75424</id>
<content type='text'>
Update various codepaths to avoid manually-counted malloc().

* jk/tighten-alloc: (22 commits)
  ewah: convert to REALLOC_ARRAY, etc
  convert ewah/bitmap code to use xmalloc
  diff_populate_gitlink: use a strbuf
  transport_anonymize_url: use xstrfmt
  git-compat-util: drop mempcpy compat code
  sequencer: simplify memory allocation of get_message
  test-path-utils: fix normalize_path_copy output buffer size
  fetch-pack: simplify add_sought_entry
  fast-import: simplify allocation in start_packfile
  write_untracked_extension: use FLEX_ALLOC helper
  prepare_{git,shell}_cmd: use argv_array
  use st_add and st_mult for allocation size computation
  convert trivial cases to FLEX_ARRAY macros
  use xmallocz to avoid size arithmetic
  convert trivial cases to ALLOC_ARRAY
  convert manual allocations to argv_array
  argv-array: add detach function
  add helpers for allocating flex-array structs
  harden REALLOC_ARRAY and xcalloc against size_t overflow
  tree-diff: catch integer overflow in combine_diff_path allocation
  ...
</content>
</entry>
<entry>
<title>Merge branch 'tg/git-remote'</title>
<updated>2016-02-26T21:37:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-26T21:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae2f25542ffdd1919b33c8f274f8172e49d64dbf'/>
<id>urn:sha1:ae2f25542ffdd1919b33c8f274f8172e49d64dbf</id>
<content type='text'>
The internal API to interact with "remote.*" configuration
variables has been streamlined.

* tg/git-remote:
  remote: use remote_is_configured() for add and rename
  remote: actually check if remote exits
  remote: simplify remote_is_configured()
  remote: use parse_config_key
</content>
</entry>
<entry>
<title>use st_add and st_mult for allocation size computation</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50a6c8efa2bbeddf46ca34c7765024108202e04b'/>
<id>urn:sha1:50a6c8efa2bbeddf46ca34c7765024108202e04b</id>
<content type='text'>
If our size computation overflows size_t, we may allocate a
much smaller buffer than we expected and overflow it. It's
probably impossible to trigger an overflow in most of these
sites in practice, but it is easy enough convert their
additions and multiplications into overflow-checking
variants. This may be fixing real bugs, and it makes
auditing the code easier.

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>convert trivial cases to FLEX_ARRAY macros</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96ffc06f72f693d80f05059a1f0e5ca9007d5f1b'/>
<id>urn:sha1:96ffc06f72f693d80f05059a1f0e5ca9007d5f1b</id>
<content type='text'>
Using FLEX_ARRAY macros reduces the amount of manual
computation size we have to do. It also ensures we don't
overflow size_t, and it makes sure we write the same number
of bytes that we allocated.

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>remote: simplify remote_is_configured()</title>
<updated>2016-02-16T21:33:12Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2016-02-16T09:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=674468b3642abfff7c61d5ff95fffc43b87f70b7'/>
<id>urn:sha1:674468b3642abfff7c61d5ff95fffc43b87f70b7</id>
<content type='text'>
The remote_is_configured() function allows checking whether a remote
exists or not.  The function however only works if remote_get() wasn't
called before calling it.  In addition, it only checks the configuration
for remotes, but not remotes or branches files.

Make use of the origin member of struct remote instead, which indicates
where the remote comes from.  It will be set to some value if the remote
is configured in any file in the repository, but is initialized to 0 if
the remote is only created in make_remote().

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
