<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/setup.c, branch v2.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-02-17T18:03:40Z</updated>
<entry>
<title>Merge branch 'nd/do-not-move-worktree-manually' into maint</title>
<updated>2016-02-17T18:03:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-17T18:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88221d92cbc21f629b60eb046e5aabd6cdc67cca'/>
<id>urn:sha1:88221d92cbc21f629b60eb046e5aabd6cdc67cca</id>
<content type='text'>
"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.

* nd/do-not-move-worktree-manually:
  worktree: stop supporting moving worktrees manually
  worktree.c: fix indentation
</content>
</entry>
<entry>
<title>clean: make is_git_repository a public function</title>
<updated>2016-01-25T19:41:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-01-22T22:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffd036b1286687589f5ce5513ee69c06ee53691e'/>
<id>urn:sha1:ffd036b1286687589f5ce5513ee69c06ee53691e</id>
<content type='text'>
We have always had is_git_directory(), for looking at a
specific directory to see if it contains a git repo. In
0179ca7 (clean: improve performance when removing lots of
directories, 2015-06-15), we added is_git_repository() which
checks for a non-bare repository by looking at its ".git"
entry.

However, the fix in 0179ca7 needs to be applied other
places, too. Let's make this new helper globally available.
We need to give it a better name, though, to avoid confusion
with is_git_directory(). This patch does that, documents
both functions with a comment to reduce confusion, and
removes the clean-specific references in the comments.

Based-on-a-patch-by: Andreas Krey &lt;a.krey@gmx.de&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>worktree: stop supporting moving worktrees manually</title>
<updated>2016-01-22T22:28:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-01-22T08:35:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=618244e160cb0777bc8d41055f7de0192b10ea0f'/>
<id>urn:sha1:618244e160cb0777bc8d41055f7de0192b10ea0f</id>
<content type='text'>
The current update_linked_gitdir() has a bug that can create "gitdir"
file in non-multi-worktree setup. Worse, sometimes it can write relative
path to "gitdir" file, which will not work (e.g. "git worktree list"
will display the worktree's location incorrectly)

Instead of fixing this, we step back a bit. The original design was
probably not well thought out. For now, if the user manually moves a
worktree, they have to fix up "gitdir" file manually or the worktree
will get pruned.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.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/repository-extension'</title>
<updated>2015-10-26T22:55:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-26T22:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa46579555583a9799d8495f632b14cddd65db6e'/>
<id>urn:sha1:fa46579555583a9799d8495f632b14cddd65db6e</id>
<content type='text'>
Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion
</content>
</entry>
<entry>
<title>Merge branch 'jk/war-on-sprintf'</title>
<updated>2015-10-20T22:24:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-20T22:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=78891795df91a313fac590dd6cff9d8aace0dc9a'/>
<id>urn:sha1:78891795df91a313fac590dd6cff9d8aace0dc9a</id>
<content type='text'>
Many allocations that is manually counted (correctly) that are
followed by strcpy/sprintf have been replaced with a less error
prone constructs such as xstrfmt.

Macintosh-specific breakage was noticed and corrected in this
reroll.

* jk/war-on-sprintf: (70 commits)
  name-rev: use strip_suffix to avoid magic numbers
  use strbuf_complete to conditionally append slash
  fsck: use for_each_loose_file_in_objdir
  Makefile: drop D_INO_IN_DIRENT build knob
  fsck: drop inode-sorting code
  convert strncpy to memcpy
  notes: document length of fanout path with a constant
  color: add color_set helper for copying raw colors
  prefer memcpy to strcpy
  help: clean up kfmclient munging
  receive-pack: simplify keep_arg computation
  avoid sprintf and strcpy with flex arrays
  use alloc_ref rather than hand-allocating "struct ref"
  color: add overflow checks for parsing colors
  drop strcpy in favor of raw sha1_to_hex
  use sha1_to_hex_r() instead of strcpy
  daemon: use cld-&gt;env_array when re-spawning
  stat_tracking_info: convert to argv_array
  http-push: use an argv_array for setup_revisions
  fetch-pack: use argv_array for index-pack / unpack-objects
  ...
</content>
</entry>
<entry>
<title>replace trivial malloc + sprintf / strcpy calls with xstrfmt</title>
<updated>2015-09-25T17:18:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75faa45ae0230b321bf72027b2274315d7e14e34'/>
<id>urn:sha1:75faa45ae0230b321bf72027b2274315d7e14e34</id>
<content type='text'>
It's a common pattern to do:

  foo = xmalloc(strlen(one) + strlen(two) + 1 + 1);
  sprintf(foo, "%s %s", one, two);

(or possibly some variant with strcpy()s or a more
complicated length computation).  We can switch these to use
xstrfmt, which is shorter, involves less error-prone manual
computation, and removes many sprintf and strcpy calls which
make it harder to audit the code for real buffer overflows.

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>path: implement common_dir handling in git_pathdup_submodule()</title>
<updated>2015-09-14T18:03:46Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2015-09-13T22:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11f9dd719104a960d3e2b478477d9055141d1dbc'/>
<id>urn:sha1:11f9dd719104a960d3e2b478477d9055141d1dbc</id>
<content type='text'>
When submodule is a linked worktree, "git diff --submodule" and other
calls which directly access the submodule's object database do not correctly
calculate its path. Fix it by changing the git_pathdup_submodule() behavior,
to use either common or per-worktree directory.

Do it similarly as for parent repository, but ignore the GIT_COMMON_DIR
environment variable, because it would mean common directory for the parent
repository and does not make sense for submodule.

Also add test for functionality which uses this call.

Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/fixup-linked-gitdir'</title>
<updated>2015-09-01T23:31:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-09-01T23:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=91d54694a4e1da804063ce64b9757d5d3148e6ad'/>
<id>urn:sha1:91d54694a4e1da804063ce64b9757d5d3148e6ad</id>
<content type='text'>
The code in "multiple-worktree" support that attempted to recover
from an inconsistent state updated an incorrect file.

* nd/fixup-linked-gitdir:
  setup: update the right file in multiple checkouts
</content>
</entry>
<entry>
<title>write_file(): drop caller-supplied LF from calls to create a one-liner file</title>
<updated>2015-08-25T19:49:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-24T20:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f76a10b2d72245332ac41bd79249cb82f3946f0'/>
<id>urn:sha1:1f76a10b2d72245332ac41bd79249cb82f3946f0</id>
<content type='text'>
All of the callsites covered by this change call write_file() or
write_file_gently() to create a one-liner file.  Drop the caller
supplied LF and let these callees to append it as necessary.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>setup: update the right file in multiple checkouts</title>
<updated>2015-08-25T16:39:08Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-08-25T10:30:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82fde87ff3be8d10854df18964e5816417a1d7cf'/>
<id>urn:sha1:82fde87ff3be8d10854df18964e5816417a1d7cf</id>
<content type='text'>
This code is introduced in 23af91d (prune: strategies for linked
checkouts - 2014-11-30), and it's supposed to implement this rule from
that commit's message:

 - linked checkouts are supposed to keep its location in $R/gitdir up
   to date. The use case is auto fixup after a manual checkout move.

Note the name, "$R/gitdir", not "$R/gitfile". Correct the path to be
updated accordingly.

While at there, make sure I/O errors are not silently dropped.

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>
</feed>
