<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/clone.c, branch v2.12.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.12.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.12.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-02-02T21:36:55Z</updated>
<entry>
<title>Merge branch 'rs/absolute-pathdup'</title>
<updated>2017-02-02T21:36:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-02T21:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f1c08bdb75b37ad30103f0f12339780fdc004e2'/>
<id>urn:sha1:6f1c08bdb75b37ad30103f0f12339780fdc004e2</id>
<content type='text'>
Code cleanup.

* rs/absolute-pathdup:
  use absolute_pathdup()
  abspath: add absolute_pathdup()
</content>
</entry>
<entry>
<title>use absolute_pathdup()</title>
<updated>2017-01-27T18:18:15Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-01-26T17:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0aaad415bcbdd7ccdfbb27eafb2f5926540455fa'/>
<id>urn:sha1:0aaad415bcbdd7ccdfbb27eafb2f5926540455fa</id>
<content type='text'>
Apply the semantic patch for converting callers that duplicate the
result of absolute_path() to call absolute_pathdup() instead, which
avoids an extra string copy to a static buffer.

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 'jc/lock-report-on-error'</title>
<updated>2016-12-19T22:45:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-12-19T22:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=95713ff4fb858c4f2e7c339cfc503c0cf152e071'/>
<id>urn:sha1:95713ff4fb858c4f2e7c339cfc503c0cf152e071</id>
<content type='text'>
Git 2.11 had a minor regression in "merge --ff-only" that competed
with another process that simultanously attempted to update the
index. We used to explain what went wrong with an error message,
but the new code silently failed.  The error message has been
resurrected.

* jc/lock-report-on-error:
  lockfile: LOCK_REPORT_ON_ERROR
  hold_locked_index(): align error handling with hold_lockfile_for_update()
  wt-status: implement opportunisitc index update correctly
</content>
</entry>
<entry>
<title>hold_locked_index(): align error handling with hold_lockfile_for_update()</title>
<updated>2016-12-07T19:31:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-12-07T18:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3e83cc752e905e063d0930c682a06de5034074f'/>
<id>urn:sha1:b3e83cc752e905e063d0930c682a06de5034074f</id>
<content type='text'>
Callers of the hold_locked_index() function pass 0 when they want to
prepare to write a new version of the index file without wishing to
die or emit an error message when the request fails (e.g. somebody
else already held the lock), and pass 1 when they want the call to
die upon failure.

This option is called LOCK_DIE_ON_ERROR by the underlying lockfile
API, and the hold_locked_index() function translates the paramter to
LOCK_DIE_ON_ERROR when calling the hold_lock_file_for_update().

Replace these hardcoded '1' with LOCK_DIE_ON_ERROR and stop
translating.  Callers other than the ones that are replaced with
this change pass '0' to the function; no behaviour change is
intended with this patch.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
---

Among the callers of hold_locked_index() that passes 0:

 - diff.c::refresh_index_quietly() at the end of "git diff" is an
   opportunistic update; it leaks the lockfile structure but it is
   just before the program exits and nobody should care.

 - builtin/describe.c::cmd_describe(),
   builtin/commit.c::cmd_status(),
   sequencer.c::read_and_refresh_cache() are all opportunistic
   updates and they are OK.

 - builtin/update-index.c::cmd_update_index() takes a lock upfront
   but we may end up not needing to update the index (i.e. the
   entries may be fully up-to-date), in which case we do not need to
   issue an error upon failure to acquire the lock.  We do diagnose
   and die if we indeed need to update, so it is OK.

 - wt-status.c::require_clean_work_tree() IS BUGGY.  It asks
   silence, does not check the returned value.  Compare with
   callsites like cmd_describe() and cmd_status() to notice that it
   is wrong to call update_index_if_able() unconditionally.
</content>
</entry>
<entry>
<title>clone,fetch: explain the shallow-clone option a little more clearly</title>
<updated>2016-12-05T22:50:57Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2016-12-04T22:03:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d8738653297e839ae59ff3284c271681cc14396'/>
<id>urn:sha1:6d8738653297e839ae59ff3284c271681cc14396</id>
<content type='text'>
"deepen by excluding" does not make sense because excluding a revision
does not deepen a repository; it makes the repository more shallow.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/clone-copy-alternates-fix' into maint</title>
<updated>2016-10-28T16:01:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=839b993f1f2a36e9e7511e4c279e4218c2127ed3'/>
<id>urn:sha1:839b993f1f2a36e9e7511e4c279e4218c2127ed3</id>
<content type='text'>
"git clone" of a local repository can be done at the filesystem
level, but the codepath did not check errors while copying and
adjusting the file that lists alternate object stores.

* jk/clone-copy-alternates-fix:
  clone: detect errors in normalize_path_copy
</content>
</entry>
<entry>
<title>Merge branch 'jk/clone-copy-alternates-fix'</title>
<updated>2016-10-17T20:25:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-17T20:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=630e05c4f3121aa67dcb1399b62e4c3767d8be55'/>
<id>urn:sha1:630e05c4f3121aa67dcb1399b62e4c3767d8be55</id>
<content type='text'>
"git clone" of a local repository can be done at the filesystem
level, but the codepath did not check errors while copying and
adjusting the file that lists alternate object stores.

* jk/clone-copy-alternates-fix:
  clone: detect errors in normalize_path_copy
</content>
</entry>
<entry>
<title>Merge branch 'nd/shallow-deepen'</title>
<updated>2016-10-10T21:03:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-10T21:03:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a460ea4a3cb1dad253604b5e2aeaa161637453a9'/>
<id>urn:sha1:a460ea4a3cb1dad253604b5e2aeaa161637453a9</id>
<content type='text'>
The existing "git fetch --depth=&lt;n&gt;" option was hard to use
correctly when making the history of an existing shallow clone
deeper.  A new option, "--deepen=&lt;n&gt;", has been added to make this
easier to use.  "git clone" also learned "--shallow-since=&lt;date&gt;"
and "--shallow-exclude=&lt;tag&gt;" options to make it easier to specify
"I am interested only in the recent N months worth of history" and
"Give me only the history since that version".

* nd/shallow-deepen: (27 commits)
  fetch, upload-pack: --deepen=N extends shallow boundary by N commits
  upload-pack: add get_reachable_list()
  upload-pack: split check_unreachable() in two, prep for get_reachable_list()
  t5500, t5539: tests for shallow depth excluding a ref
  clone: define shallow clone boundary with --shallow-exclude
  fetch: define shallow boundary with --shallow-exclude
  upload-pack: support define shallow boundary by excluding revisions
  refs: add expand_ref()
  t5500, t5539: tests for shallow depth since a specific date
  clone: define shallow clone boundary based on time with --shallow-since
  fetch: define shallow boundary with --shallow-since
  upload-pack: add deepen-since to cut shallow repos based on time
  shallow.c: implement a generic shallow boundary finder based on rev-list
  fetch-pack: use a separate flag for fetch in deepening mode
  fetch-pack.c: mark strings for translating
  fetch-pack: use a common function for verbose printing
  fetch-pack: use skip_prefix() instead of starts_with()
  upload-pack: move rev-list code out of check_non_tip()
  upload-pack: make check_non_tip() clean things up on error
  upload-pack: tighten number parsing at "deepen" lines
  ...
</content>
</entry>
<entry>
<title>clone: detect errors in normalize_path_copy</title>
<updated>2016-10-05T17:44:39Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-05T14:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22d3b8de1b625813faec6f3d6ffe66124837b78b'/>
<id>urn:sha1:22d3b8de1b625813faec6f3d6ffe66124837b78b</id>
<content type='text'>
When we are copying the alternates from the source
repository, if we find a relative path that is too deep for
the source (e.g., "../../../objects" from "/repo.git/objects"),
then normalize_path_copy will report an error and leave
trash in the buffer, which we will add to our new alternates
file. Instead, let's detect the error, print a warning, and
skip copying that alternate.

There's no need to die. The relative path is probably just
broken cruft in the source repo. If it turns out to have
been important for accessing some objects, we rely on other
parts of the clone to detect that, just as they would with a
missing object in the source repo itself (though note that
clones with "-s" are inherently local, which may do fewer
object-quality checks in the first place).

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 'nd/init-core-worktree-in-multi-worktree-world'</title>
<updated>2016-10-03T20:30:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-03T20:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53eb85e6230e2c09dbc06f88b67e7a3baccc4446'/>
<id>urn:sha1:53eb85e6230e2c09dbc06f88b67e7a3baccc4446</id>
<content type='text'>
"git init" tried to record core.worktree in the repository's
'config' file when GIT_WORK_TREE environment variable was set and
it was different from where GIT_DIR appears as ".git" at its top,
but the logic was faulty when .git is a "gitdir:" file that points
at the real place, causing trouble in working trees that are
managed by "git worktree".  This has been corrected.

* nd/init-core-worktree-in-multi-worktree-world:
  init: kill git_link variable
  init: do not set unnecessary core.worktree
  init: kill set_git_dir_init()
  init: call set_git_dir_init() from within init_db()
  init: correct re-initialization from a linked worktree
</content>
</entry>
</feed>
