<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/cache.h, branch v2.9.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.9.3</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.9.3'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2016-08-12T16:16:56Z</updated>
<entry>
<title>Merge branch 'jk/reset-ident-time-per-commit' into maint</title>
<updated>2016-08-12T16:16:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-12T16:16:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f4fd6276619dfe7cf9a024730ca65b1bd0b3492b'/>
<id>urn:sha1:f4fd6276619dfe7cf9a024730ca65b1bd0b3492b</id>
<content type='text'>
Not-so-recent rewrite of "git am" that started making internal
calls into the commit machinery had an unintended regression, in
that no matter how many seconds it took to apply many patches, the
resulting committer timestamp for the resulting commits were all
the same.

* jk/reset-ident-time-per-commit:
  am: reset cached ident date for each patch
</content>
</entry>
<entry>
<title>Merge branch 'jk/send-pack-stdio' into maint</title>
<updated>2016-08-08T21:21:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:39Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1e274ef2ba7d345f1bc469f46030f871aa348863'/>
<id>urn:sha1:1e274ef2ba7d345f1bc469f46030f871aa348863</id>
<content type='text'>
Code clean-up.

* jk/send-pack-stdio:
  write_or_die: remove the unused write_or_whine() function
  send-pack: use buffered I/O to talk to pack-objects
</content>
</entry>
<entry>
<title>Merge branch 'nd/pack-ofs-4gb-limit' into maint</title>
<updated>2016-08-08T21:21:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=aa9136a87e3ce299fe966da4686a571d6a528311'/>
<id>urn:sha1:aa9136a87e3ce299fe966da4686a571d6a528311</id>
<content type='text'>
"git pack-objects" and "git index-pack" mostly operate with off_t
when talking about the offset of objects in a packfile, but there
were a handful of places that used "unsigned long" to hold that
value, leading to an unintended truncation.

* nd/pack-ofs-4gb-limit:
  fsck: use streaming interface for large blobs in pack
  pack-objects: do not truncate result in-pack object size on 32-bit systems
  index-pack: correct "offset" type in unpack_entry_data()
  index-pack: report correct bad object offsets even if they are large
  index-pack: correct "len" type in unpack_data()
  sha1_file.c: use type off_t* for object_info-&gt;disk_sizep
  pack-objects: pass length to check_pack_crc() without truncation
</content>
</entry>
<entry>
<title>am: reset cached ident date for each patch</title>
<updated>2016-08-01T21:49:41Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-08-01T19:37:00Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4d9c7e6f45523ce1bf9615689e6c4e13fd82ed5d'/>
<id>urn:sha1:4d9c7e6f45523ce1bf9615689e6c4e13fd82ed5d</id>
<content type='text'>
When we compute the date to go in author/committer lines of
commits, or tagger lines of tags, we get the current date
once and then cache it for the rest of the program.  This is
a good thing in some cases, like "git commit", because it
means we do not racily assign different times to the
author/committer fields of a single commit object.

But as more programs start to make many commits in a single
process (e.g., the recently builtin "git am"), it means that
you'll get long strings of commits with identical committer
timestamps (whereas before, we invoked "git commit" many
times and got true timestamps).

This patch addresses it by letting callers reset the cached
time, which means they'll get a fresh time on their next
call to git_committer_info() or git_author_info(). The first
caller to do so is "git am", which resets the time for each
patch it applies.

It would be nice if we could just do this automatically
before filling in the ident fields of commit and tag
objects. Unfortunately, it's hard to know where a particular
logical operation begins and ends.

For instance, if commit_tree_extended() were to call
reset_ident_date() before getting the committer/author
ident, that doesn't quite work; sometimes the author info is
passed in to us as a parameter, and it may or may not have
come from a previous call to ident_default_date(). So in
those cases, we lose the property that the committer and the
author timestamp always match.

You could similarly put a date-reset at the end of
commit_tree_extended(). That actually works in the current
code base, but it's fragile. It makes the assumption that
after commit_tree_extended() finishes, the caller has no
other operations that would logically want to fall into the
same timestamp.

So instead we provide the tool to easily do the reset, and
let the high-level callers use it to annotate their own
logical operations.

There's no automated test, because it would be inherently
racy (it depends on whether the program takes multiple
seconds to run). But you can see the effect with something
like:

  # make a fake 100-patch series
  top=$(git rev-parse HEAD)
  bottom=$(git rev-list --first-parent -100 HEAD | tail -n 1)
  git log --format=email --reverse --first-parent \
          --binary -m -p $bottom..$top &gt;patch

  # now apply it; this presumably takes multiple seconds
  git checkout --detach $bottom
  git am &lt;patch

  # now count the number of distinct committer times;
  # prior to this patch, there would only be one, but
  # now we'd typically see several.
  git log --format=%ct $bottom.. | sort -u

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Helped-by: Paul Tan &lt;pyokagan@gmail.com&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>sha1_file.c: use type off_t* for object_info-&gt;disk_sizep</title>
<updated>2016-07-13T16:14:20Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-07-13T15:43:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=166df26f2821ea23b7c269a32fd63be43a2a0bb9'/>
<id>urn:sha1:166df26f2821ea23b7c269a32fd63be43a2a0bb9</id>
<content type='text'>
This field, filled by sha1_object_info() contains the on-disk size of
an object, which could go over 4GB limit of unsigned long on 32-bit
systems. Use off_t for it instead and update all callers.

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>write_or_die: remove the unused write_or_whine() function</title>
<updated>2016-06-10T17:54:27Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsayjones.plus.com</email>
</author>
<published>2016-06-09T22:52:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b333d0d6f450d4f9c4535fd9fd6e0f4ef367507c'/>
<id>urn:sha1:b333d0d6f450d4f9c4535fd9fd6e0f4ef367507c</id>
<content type='text'>
Now the last caller of this function is gone, and new ones are
unlikely to appear, because this function is doing very little that
a regular if() does not besides obfuscating the error message (and
if we ever did want something like it, we would probably prefer the
function to come back with more "normal" return value semantics).

Signed-off-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: add --chmod=+x / --chmod=-x options</title>
<updated>2016-06-08T00:43:39Z</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2016-05-31T22:08:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4e55ed32db81d06a4f618e2cc0f9da0e223ae304'/>
<id>urn:sha1:4e55ed32db81d06a4f618e2cc0f9da0e223ae304</id>
<content type='text'>
The executable bit will not be detected (and therefore will not be
set) for paths in a repository with `core.filemode` set to false,
though the users may still wish to add files as executable for
compatibility with other users who _do_ have `core.filemode`
functionality.  For example, Windows users adding shell scripts may
wish to add them as executable for compatibility with users on
non-Windows.

Although this can be done with a plumbing command
(`git update-index --add --chmod=+x foo`), teaching the `git-add`
command allows users to set a file executable with a command that
they're already familiar with.

Signed-off-by: Edward Thomson &lt;ethomson@edwardthomson.com&gt;
Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/windows-dotgit' into maint</title>
<updated>2016-05-26T20:17:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-26T20:17:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e29300d69fb8e003b36f155a5f286d72ee5a557f'/>
<id>urn:sha1:e29300d69fb8e003b36f155a5f286d72ee5a557f</id>
<content type='text'>
On Windows, .git and optionally any files whose name starts with a
dot are now marked as hidden, with a core.hideDotFiles knob to
customize this behaviour.

* js/windows-dotgit:
  mingw: remove unnecessary definition
  mingw: introduce the 'core.hideDotFiles' setting
</content>
</entry>
<entry>
<title>Merge branch 'nd/worktree-various-heads'</title>
<updated>2016-05-23T21:54:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-23T21:54:29Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=352d72a30e3d113064ebc194f49560eeae34b332'/>
<id>urn:sha1:352d72a30e3d113064ebc194f49560eeae34b332</id>
<content type='text'>
The experimental "multiple worktree" feature gains more safety to
forbid operations on a branch that is checked out or being actively
worked on elsewhere, by noticing that e.g. it is being rebased.

* nd/worktree-various-heads:
  branch: do not rename a branch under bisect or rebase
  worktree.c: check whether branch is bisected in another worktree
  wt-status.c: split bisect detection out of wt_status_get_state()
  worktree.c: check whether branch is rebased in another worktree
  worktree.c: avoid referencing to worktrees[i] multiple times
  wt-status.c: make wt_status_check_rebase() work on any worktree
  wt-status.c: split rebase detection out of wt_status_get_state()
  path.c: refactor and add worktree_git_path()
  worktree.c: mark current worktree
  worktree.c: make find_shared_symref() return struct worktree *
  worktree.c: store "id" instead of "git_dir"
  path.c: add git_common_path() and strbuf_git_common_path()
  dir.c: rename str(n)cmp_icase to fspath(n)cmp
</content>
</entry>
<entry>
<title>Merge branch 'nd/remove-unused' into HEAD</title>
<updated>2016-05-18T21:40:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-18T21:40:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=14af79b93d3f8fa4aaf97a05f8a0564071c656a0'/>
<id>urn:sha1:14af79b93d3f8fa4aaf97a05f8a0564071c656a0</id>
<content type='text'>
Code cleanup.

* nd/remove-unused:
  wrapper.c: delete dead function git_mkstemps()
  dir.c: remove dead function fnmatch_icase()
</content>
</entry>
</feed>
