<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Makefile, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-05-19T07:45:28Z</updated>
<entry>
<title>Merge branch 'jk/cocci-batch'</title>
<updated>2019-05-19T07:45:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-19T07:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6795fc8afd49ecc0ae57661a8858d6882108cef5'/>
<id>urn:sha1:6795fc8afd49ecc0ae57661a8858d6882108cef5</id>
<content type='text'>
Optionally "make coccicheck" can feed multiple source files to
spatch, gaining performance while spending more memory.

* jk/cocci-batch:
  coccicheck: make batch size of 0 mean "unlimited"
  coccicheck: optionally batch spatch invocations
</content>
</entry>
<entry>
<title>Merge branch 'cc/access-on-aix-workaround'</title>
<updated>2019-05-13T14:50:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=40bef4992ea86b79fa80ebd7e6fd19fecdc5879b'/>
<id>urn:sha1:40bef4992ea86b79fa80ebd7e6fd19fecdc5879b</id>
<content type='text'>
Workaround for standard-compliant but less-than-useful behaviour of
access(2) for the root user.

* cc/access-on-aix-workaround:
  git-compat-util: work around for access(X_OK) under root
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-internal'</title>
<updated>2019-05-13T14:50:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ba06bc3d026cee54437db5cfddfffe7b4d7a187'/>
<id>urn:sha1:7ba06bc3d026cee54437db5cfddfffe7b4d7a187</id>
<content type='text'>
The internal implementation of "git rebase -i" has been updated to
avoid forking a separate "rebase--interactive" process.

* pw/rebase-i-internal:
  rebase -i: run without forking rebase--interactive
  rebase: use a common action enum
  rebase -i: use struct rebase_options in do_interactive_rebase()
  rebase -i: use struct rebase_options to parse args
  rebase -i: use struct object_id for squash_onto
  rebase -i: use struct commit when parsing options
  rebase -i: remove duplication
  rebase -i: combine rebase--interactive.c with rebase.c
  rebase: use OPT_RERERE_AUTOUPDATE()
  rebase: rename write_basic_state()
  rebase: don't translate trace strings
  sequencer: always discard index after checkout
</content>
</entry>
<entry>
<title>Merge branch 'jc/make-dedup-ls-files-output'</title>
<updated>2019-05-13T14:50:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a505f62f6f1ebdacab075f1ce52f949f33f7450f'/>
<id>urn:sha1:a505f62f6f1ebdacab075f1ce52f949f33f7450f</id>
<content type='text'>
A "ls-files" that emulates "find" to enumerate files in the working
tree resulted in duplicated Makefile rules that caused the build to
issue an unnecessary warning during a trial build after merge
conflicts are resolved in working tree *.h files but before the
resolved results are added to the index.  This has been corrected.

* jc/make-dedup-ls-files-output:
  Makefile: dedup list of files obtained from ls-files
</content>
</entry>
<entry>
<title>Merge branch 'jh/trace2-sid-fix'</title>
<updated>2019-05-13T14:50:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b2d1c0c6eceb5fd6c9527bc2863179644dce840'/>
<id>urn:sha1:5b2d1c0c6eceb5fd6c9527bc2863179644dce840</id>
<content type='text'>
Polishing of the new trace2 facility continues.  The system-level
configuration can specify site-wide trace2 settings, which can be
overridden with per-user configuration and environment variables.

* jh/trace2-sid-fix:
  trace2: fixup access problem on /etc/gitconfig in read_very_early_config
  trace2: update docs to describe system/global config settings
  trace2: make SIDs more unique
  trace2: clarify UTC datetime formatting
  trace2: report peak memory usage of the process
  trace2: use system/global config for default trace2 settings
  config: add read_very_early_config()
  trace2: find exec-dir before trace2 initialization
  trace2: add absolute elapsed time to start event
  trace2: refactor setting process starting time
  config: initialize opts structure in repo_read_config()
</content>
</entry>
<entry>
<title>Merge branch 'js/misc-doc-fixes'</title>
<updated>2019-05-08T15:37:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-08T15:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=caa227ff458f34155ef4e974ba9e57c857c02c01'/>
<id>urn:sha1:caa227ff458f34155ef4e974ba9e57c857c02c01</id>
<content type='text'>
"make check-docs", "git help -a", etc. did not account for cases
where a particular build may deliberately omit some subcommands,
which has been corrected.

* js/misc-doc-fixes:
  Turn `git serve` into a test helper
  test-tool: handle the `-C &lt;directory&gt;` option just like `git`
  check-docs: do not bother checking for legacy scripts' documentation
  docs: exclude documentation for commands that have been excluded
  check-docs: allow command-list.txt to contain excluded commands
  help -a: do not list commands that are excluded from the build
  Makefile: drop the NO_INSTALL variable
  remote-testgit: move it into the support directory for t5801
</content>
</entry>
<entry>
<title>coccicheck: make batch size of 0 mean "unlimited"</title>
<updated>2019-05-08T10:25:14Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-05-08T07:07:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcb4edf7af7f10878dd75ccfc3fc0f7596f2d658'/>
<id>urn:sha1:bcb4edf7af7f10878dd75ccfc3fc0f7596f2d658</id>
<content type='text'>
If you have the memory to handle it, the ideal case is to run a single
spatch invocation with all of the source files. But the only way to do
so now is to pick an arbitrarily large batch size. Let's make "0" do
this, which is a little friendlier (and doesn't otherwise have a useful
meaning).

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>coccicheck: optionally batch spatch invocations</title>
<updated>2019-05-07T02:37:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-05-06T23:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=960154b9c17afb276e12d0bec83513f3e46de565'/>
<id>urn:sha1:960154b9c17afb276e12d0bec83513f3e46de565</id>
<content type='text'>
In our "make coccicheck" rule, we currently feed each source file to its
own individual invocation of spatch. This has a few downsides:

  - it repeats any overhead spatch has for starting up and reading the
    patch file

  - any included header files may get processed from multiple
    invocations. This is slow (we see the same header files multiple
    times) and may produce a resulting patch with repeated hunks (which
    cannot be applied without further cleanup)

Ideally we'd just invoke a single instance of spatch per rule-file and
feed it all source files. But spatch can be rather memory hungry when
run in this way. I measured the peak RSS going from ~90MB for a single
file to ~1900MB for all files. Multiplied by multiple rule files being
processed at the same time (for "make -j"), this can make things slower
or even cause them to fail (e.g., this is reported to happen on our
Travis builds).

Instead, let's provide a tunable knob. We'll leave the default at "1",
but it can be cranked up to "999" for maximum CPU/memory tradeoff, or
people can find points in between that serve their particular machines.

Here are a few numbers running a single rule via:

  SIZES='1 4 16 999'
  RULE=contrib/coccinelle/object_id.cocci
  for i in $SIZES; do
    make clean
    /usr/bin/time -o $i.out --format='%e | %U | %S | %M' \
      make $RULE.patch SPATCH_BATCH_SIZE=$i
  done
  for i in $SIZES; do
    printf '%4d | %s\n' $i "$(cat $i.out)"
  done

which yields:

     1 | 97.73 | 93.38 | 4.33 | 100128
     4 | 52.80 | 51.14 | 1.69 | 135204
    16 | 35.82 | 35.09 | 0.76 | 284124
   999 | 23.30 | 23.13 | 0.20 | 1903852

The implementation is done with xargs, which should be widely available;
it's in POSIX, we rely on it already in the test suite. And "coccicheck"
is really a developer-only tool anyway, so it's not a big deal if
obscure systems can't run it.

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>git-compat-util: work around for access(X_OK) under root</title>
<updated>2019-04-25T08:49:44Z</updated>
<author>
<name>Clément Chigot</name>
<email>clement.chigot@atos.net</email>
</author>
<published>2019-04-25T07:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=400caafb2bb63712bb23cfa4d800261aab8e5cae'/>
<id>urn:sha1:400caafb2bb63712bb23cfa4d800261aab8e5cae</id>
<content type='text'>
On AIX, access(X_OK) may succeed when run as root even if the
execution isn't possible. This behavior is allowed by POSIX
which says:

  ... for a process with appropriate privileges, an implementation
  may indicate success for X_OK even if execute permission is not
  granted to any user.

It can lead hook programs to have their execution refused:

   git commit -m content
   fatal: cannot exec '.git/hooks/pre-commit': Permission denied

Add NEED_ACCESS_ROOT_HANDLER in order to use an access helper function.
It checks with stat if any executable flags is set when the current user
is root.

Signed-off-by: Clément Chigot &lt;clement.chigot@atos.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Makefile: dedup list of files obtained from ls-files</title>
<updated>2019-04-22T06:14:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-21T13:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=604a64641d874b0f00f1d1371f25be177972bcf2'/>
<id>urn:sha1:604a64641d874b0f00f1d1371f25be177972bcf2</id>
<content type='text'>
Since 33533975 ("Makefile: ask "ls-files" to list source files if
available", 2011-10-18), we optionally asked "ls-files" to list the
source files that ought to exist, as a faster approximation for
"find" on working tree files.

This works reasonably well, except that it ends up listing the same
path multiple times if the index is unmerged.  Because the original
use of this construct was to name files to run etags over, and the
etags command happily takes the same filename multiple times without
causing any harm, there was no problem (other than perhaps spending
slightly more cycles, but who cares how fast the TAGS file gets
updated).

We however recently added a similar call to "ls-files" to list *.h
files, instead of using "find", in 92b88eba ("Makefile: use `git
ls-files` to list header files, if possible", 2019-03-04).  In this
new use of "ls-files", the resulting list $(LIB_H) is used for,
among other things, generating the header files to run hdr-check
target, and the duplicate unfortunately becomes a true problem.  It
causes $(MAKE) to notice that there are multiple %.hco targets and
complain.

Let the resulting list consumed by $(sort), which deduplicates,
to fix this.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
