<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-compat-util.h, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-28T17:41:53Z</updated>
<entry>
<title>Revert "Merge branch 'dt/refs-check-refname-component-sse'"</title>
<updated>2014-07-28T17:41:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-28T17:41:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5e6502288d713cfa673c456a040ad0841db11dfa'/>
<id>urn:sha1:5e6502288d713cfa673c456a040ad0841db11dfa</id>
<content type='text'>
This reverts commit 6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9, reversing
changes made to a02ad882a17b9d45f63ea448391ac5e9f7948222.
</content>
</entry>
<entry>
<title>Merge branch 'kb/perf-trace'</title>
<updated>2014-07-22T17:59:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-22T17:59:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f2de9c121c60cba9e55db5263a7bceffcd8fe2d'/>
<id>urn:sha1:9f2de9c121c60cba9e55db5263a7bceffcd8fe2d</id>
<content type='text'>
* kb/perf-trace:
  api-trace.txt: add trace API documentation
  progress: simplify performance measurement by using getnanotime()
  wt-status: simplify performance measurement by using getnanotime()
  git: add performance tracing for git's main() function to debug scripts
  trace: add trace_performance facility to debug performance issues
  trace: add high resolution timer function to debug performance issues
  trace: add 'file:line' to all trace output
  trace: move code around, in preparation to file:line output
  trace: add current timestamp to all trace output
  trace: disable additional trace output for unit tests
  trace: add infrastructure to augment trace output with additional info
  sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API
  Documentation/git.txt: improve documentation of 'GIT_TRACE*' variables
  trace: improve trace performance
  trace: remove redundant printf format attribute
  trace: consistently name the format parameter
  trace: move trace declarations from cache.h to new trace.h
</content>
</entry>
<entry>
<title>Merge branch 'ak/profile-feedback-build'</title>
<updated>2014-07-21T18:17:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-21T18:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b3b61c5d5ef93a68e9af3c17eebc09c96b71d08'/>
<id>urn:sha1:3b3b61c5d5ef93a68e9af3c17eebc09c96b71d08</id>
<content type='text'>
* ak/profile-feedback-build:
  Fix profile feedback with -jN and add profile-fast
  Run the perf test suite for profile feedback too
  Don't define away __attribute__ on gcc
  Use BASIC_FLAGS for profile feedback
</content>
</entry>
<entry>
<title>Merge branch 'jk/strip-suffix'</title>
<updated>2014-07-16T18:26:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-16T18:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e4094731acee5207595a8416d19508107ea475d'/>
<id>urn:sha1:6e4094731acee5207595a8416d19508107ea475d</id>
<content type='text'>
* jk/strip-suffix:
  prepare_packed_git_one: refactor duplicate-pack check
  verify-pack: use strbuf_strip_suffix
  strbuf: implement strbuf_strip_suffix
  index-pack: use strip_suffix to avoid magic numbers
  use strip_suffix instead of ends_with in simple cases
  replace has_extension with ends_with
  implement ends_with via strip_suffix
  add strip_suffix function
  sha1_file: replace PATH_MAX buffer with strbuf in prepare_packed_git_one()
</content>
</entry>
<entry>
<title>trace: add 'file:line' to all trace output</title>
<updated>2014-07-14T04:25:20Z</updated>
<author>
<name>Karsten Blees</name>
<email>karsten.blees@gmail.com</email>
</author>
<published>2014-07-12T00:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e05bed960d3bf3bcfd0f27ab882df3da93e118ed'/>
<id>urn:sha1:e05bed960d3bf3bcfd0f27ab882df3da93e118ed</id>
<content type='text'>
This is useful to see where trace output came from.

Add 'const char *file, int line' parameters to the printing functions and
rename them to *_fl.

Add trace_printf* and trace_strbuf macros resolving to the *_fl functions
and let the preprocessor fill in __FILE__ and __LINE__.

As the trace_printf* functions take a variable number of arguments, this
requires variadic macros (i.e. '#define foo(...) foo_impl(__VA_ARGS__)'.
Though part of C99, it is unclear whether older compilers support this.
Thus keep the old functions and only enable variadic macros for GNUC and
MSVC 2005+ (_MSC_VER 1400). This has the nice side effect that the old
C-style declarations serve as documentation how the macros are to be used.

Print 'file:line ' as prefix to each trace line. Align the remaining trace
output at column 40 to accommodate 18 char file names + 4 digit line
number (currently there are 30 *.c files of length 18 and just 11 of 19).
Trace output from longer source files (e.g. builtin/receive-pack.c) will
not be aligned.

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/skip-prefix'</title>
<updated>2014-07-09T18:33:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-09T18:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e91ae32a01ffe294b8510c1d8cd7138493a0712f'/>
<id>urn:sha1:e91ae32a01ffe294b8510c1d8cd7138493a0712f</id>
<content type='text'>
* jk/skip-prefix:
  http-push: refactor parsing of remote object names
  imap-send: use skip_prefix instead of using magic numbers
  use skip_prefix to avoid repeated calculations
  git: avoid magic number with skip_prefix
  fetch-pack: refactor parsing in get_ack
  fast-import: refactor parsing of spaces
  stat_opt: check extra strlen call
  daemon: use skip_prefix to avoid magic numbers
  fast-import: use skip_prefix for parsing input
  use skip_prefix to avoid repeating strings
  use skip_prefix to avoid magic numbers
  transport-helper: avoid reading past end-of-string
  fast-import: fix read of uninitialized argv memory
  apply: use skip_prefix instead of raw addition
  refactor skip_prefix to return a boolean
  avoid using skip_prefix as a boolean
  daemon: mark some strings as const
  parse_diff_color_slot: drop ofs parameter
</content>
</entry>
<entry>
<title>Don't define away __attribute__ on gcc</title>
<updated>2014-07-07T21:01:14Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2014-07-04T23:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8cd7ebc89e025f1d5bc4b247497e4cfd7fd8ec0f'/>
<id>urn:sha1:8cd7ebc89e025f1d5bc4b247497e4cfd7fd8ec0f</id>
<content type='text'>
Profile feedback sets -DNO_NORETURN, which causes the compat
header file to go into a default #else block. That #else
block defines away __attribute__(). Doing so causes all
kinds of problems with the Linux and gcc system headers:
in particular it makes the xmmintrin.h headers error out,
breaking the build.

Don't define away __attribute__ when __GNUC__ is set.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dt/refs-check-refname-component-sse'</title>
<updated>2014-07-02T19:53:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-02T19:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9'/>
<id>urn:sha1:6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9</id>
<content type='text'>
Further micro-optimization of a leaf-function.

* dt/refs-check-refname-component-sse:
  refs.c: SSE2 optimizations for check_refname_component
</content>
</entry>
<entry>
<title>replace has_extension with ends_with</title>
<updated>2014-06-30T20:43:16Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-30T16:58:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2975c770ca609ea5afc80631c4ac9087c527b6fd'/>
<id>urn:sha1:2975c770ca609ea5afc80631c4ac9087c527b6fd</id>
<content type='text'>
These two are almost the same function, with the exception
that has_extension only matches if there is content before
the suffix. So ends_with(".exe", ".exe") is true, but
has_extension would not be.

This distinction does not matter to any of the callers,
though, and we can just replace uses of has_extension with
ends_with. We prefer the "ends_with" name because it is more
generic, and there is nothing about the function that
requires it to be used for file extensions.

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>implement ends_with via strip_suffix</title>
<updated>2014-06-30T20:43:16Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-30T16:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f52a35fd63cc6d570083cedc15576d01c0968d98'/>
<id>urn:sha1:f52a35fd63cc6d570083cedc15576d01c0968d98</id>
<content type='text'>
The ends_with function is essentially a simplified version
of strip_suffix, in which we throw away the stripped length.
Implementing it as an inline on top of strip_suffix has two
advantages:

  1. We save a bit of duplicated code.

  2. The suffix is typically a string literal, and we call
     strlen on it. By making the function inline, many
     compilers can replace the strlen call with a constant.

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