<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, branch v2.9.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.3'/>
<link rel='alternate' type='text/html' href='https://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://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 'rs/use-strbuf-addstr' into maint</title>
<updated>2016-08-10T18:55:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-10T18:55:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=574a31b5b76b82b18e85825385d8594372152a8f'/>
<id>urn:sha1:574a31b5b76b82b18e85825385d8594372152a8f</id>
<content type='text'>
* rs/use-strbuf-addstr:
  use strbuf_addstr() instead of strbuf_addf() with "%s"
  use strbuf_addstr() for adding constant strings to a strbuf
</content>
</entry>
<entry>
<title>Merge branch 'os/no-verify-skips-commit-msg-too' into maint</title>
<updated>2016-08-10T18:55:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-10T18:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9d7ab3b1d5a1d1e24b2249e612bab41819b6188'/>
<id>urn:sha1:d9d7ab3b1d5a1d1e24b2249e612bab41819b6188</id>
<content type='text'>
"git commit --help" said "--no-verify" is only about skipping the
pre-commit hook, and failed to say that it also skipped the
commit-msg hook.

* os/no-verify-skips-commit-msg-too:
  commit: describe that --no-verify skips the commit-msg hook in the help text
</content>
</entry>
<entry>
<title>Merge branch 'rs/rm-strbuf-optim' into maint</title>
<updated>2016-08-10T18:55:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-10T18:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7fb136bf6f49ff7849c8ed8e5d94ca55c210310'/>
<id>urn:sha1:b7fb136bf6f49ff7849c8ed8e5d94ca55c210310</id>
<content type='text'>
The use of strbuf in "git rm" to build filename to remove was a bit
suboptimal, which has been fixed.

* rs/rm-strbuf-optim:
  rm: reuse strbuf for all remove_dir_recursively() calls
</content>
</entry>
<entry>
<title>Merge branch 'jk/parse-options-concat' into maint</title>
<updated>2016-08-10T18:55:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-10T18:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=60b84ba26c588c09759b90b96e072cceb862a859'/>
<id>urn:sha1:60b84ba26c588c09759b90b96e072cceb862a859</id>
<content type='text'>
Users of the parse_options_concat() API function need to allocate
extra slots in advance and fill them with OPT_END() when they want
to decide the set of supported options dynamically, which makes the
code error-prone and hard to read.  This has been corrected by tweaking
the API to allocate and return a new copy of "struct option" array.

* jk/parse-options-concat:
  parse_options: allocate a new array when concatenating
</content>
</entry>
<entry>
<title>Merge branch 'pb/commit-editmsg-path' into maint</title>
<updated>2016-08-08T21:21:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a220e2bbbfb325fee6c1ffb1dcdf415bfcd59ae5'/>
<id>urn:sha1:a220e2bbbfb325fee6c1ffb1dcdf415bfcd59ae5</id>
<content type='text'>
Code clean-up.

* pb/commit-editmsg-path:
  builtin/commit.c: memoize git-path for COMMIT_EDITMSG
</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://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>Merge branch 'mh/blame-worktree' into maint</title>
<updated>2016-08-08T21:21:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=327b3f8459a316aa5c27a8784f0f504122fce60e'/>
<id>urn:sha1:327b3f8459a316aa5c27a8784f0f504122fce60e</id>
<content type='text'>
"git blame file" allowed the lineage of lines in the uncommitted,
unadded contents of "file" to be inspected, but it refused when
"file" did not appear in the current commit.  When "file" was
created by renaming an existing file (but the change has not been
committed), this restriction was unnecessarily tight.

* mh/blame-worktree:
  t/t8003-blame-corner-cases.sh: Use here documents
  blame: allow to blame paths freshly added to the index
</content>
</entry>
<entry>
<title>use strbuf_addstr() instead of strbuf_addf() with "%s"</title>
<updated>2016-08-05T22:09:25Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-05T20:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc57b9c0cc5a123365a922fa1831177e3fd607ed'/>
<id>urn:sha1:bc57b9c0cc5a123365a922fa1831177e3fd607ed</id>
<content type='text'>
Call strbuf_addstr() for adding a simple string to a strbuf instead of
using the heavier strbuf_addf().  This is shorter and documents the
intent more clearly.

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