<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/log-tree.c, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-11-22T04:18:59Z</updated>
<entry>
<title>log: add option to choose which refs to decorate</title>
<updated>2017-11-22T04:18:59Z</updated>
<author>
<name>Rafael Ascensão</name>
<email>rafa.almas@gmail.com</email>
</author>
<published>2017-11-21T21:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65516f586b69307f977cd67cc45513a296cabc25'/>
<id>urn:sha1:65516f586b69307f977cd67cc45513a296cabc25</id>
<content type='text'>
When `log --decorate` is used, git will decorate commits with all
available refs. While in most cases this may give the desired effect,
under some conditions it can lead to excessively verbose output.

Introduce two command line options, `--decorate-refs=&lt;pattern&gt;` and
`--decorate-refs-exclude=&lt;pattern&gt;` to allow the user to select which
refs are used in decoration.

When "--decorate-refs=&lt;pattern&gt;" is given, only the refs that match the
pattern are used in decoration. The refs that match the pattern when
"--decorate-refs-exclude=&lt;pattern&gt;" is given, are never used in
decoration.

These options follow the same convention for mixing negative and
positive patterns across the system, assuming that the inclusive default
is to match all refs available.

 (1) if there is no positive pattern given, pretend as if an
     inclusive default positive pattern was given;

 (2) for each candidate, reject it if it matches no positive
     pattern, or if it matches any one of the negative patterns.

The rules for what is considered a match are slightly different from the
rules used elsewhere.

Commands like `log --glob` assume a trailing '/*' when glob chars are
not present in the pattern. This makes it difficult to specify a single
ref.  On the other hand, commands like `describe --match --all` allow
specifying exact refs, but do not have the convenience of allowing
"shorthand refs" like 'refs/heads' or 'heads' to refer to
'refs/heads/*'.

The commands introduced in this patch consider a match if:

  (a) the pattern contains globs chars,
	and regular pattern matching returns a match.

  (b) the pattern does not contain glob chars,
         and ref '&lt;pattern&gt;' exists, or if ref exists under '&lt;pattern&gt;/'

This allows both behaviours (allowing single refs and shorthand refs)
yet remaining compatible with existent commands.

Helped-by: Kevin Daudt &lt;me@ikke.info&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Rafael Ascensão &lt;rafa.almas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bw/diff-opt-impl-to-bitfields'</title>
<updated>2017-11-09T05:31:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-09T05:31:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8cc633286a4803025d84b77c808a2c7ad8616f2f'/>
<id>urn:sha1:8cc633286a4803025d84b77c808a2c7ad8616f2f</id>
<content type='text'>
A single-word "unsigned flags" in the diff options is being split
into a structure with many bitfields.

* bw/diff-opt-impl-to-bitfields:
  diff: make struct diff_flags members lowercase
  diff: remove DIFF_OPT_CLR macro
  diff: remove DIFF_OPT_SET macro
  diff: remove DIFF_OPT_TST macro
  diff: remove touched flags
  diff: add flag to indicate textconv was set via cmdline
  diff: convert flags to be stored in bitfields
  add, reset: use DIFF_OPT_SET macro to set a diff flag
</content>
</entry>
<entry>
<title>diff: make struct diff_flags members lowercase</title>
<updated>2017-11-01T02:51:40Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-10-31T18:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b'/>
<id>urn:sha1:0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b</id>
<content type='text'>
Now that the flags stored in struct diff_flags are being accessed
directly and not through macros, change all struct members from being
uppercase to lowercase.
This conversion is done using the following semantic patch:

	@@
	expression E;
	@@
	- E.RECURSIVE
	+ E.recursive

	@@
	expression E;
	@@
	- E.TREE_IN_RECURSIVE
	+ E.tree_in_recursive

	@@
	expression E;
	@@
	- E.BINARY
	+ E.binary

	@@
	expression E;
	@@
	- E.TEXT
	+ E.text

	@@
	expression E;
	@@
	- E.FULL_INDEX
	+ E.full_index

	@@
	expression E;
	@@
	- E.SILENT_ON_REMOVE
	+ E.silent_on_remove

	@@
	expression E;
	@@
	- E.FIND_COPIES_HARDER
	+ E.find_copies_harder

	@@
	expression E;
	@@
	- E.FOLLOW_RENAMES
	+ E.follow_renames

	@@
	expression E;
	@@
	- E.RENAME_EMPTY
	+ E.rename_empty

	@@
	expression E;
	@@
	- E.HAS_CHANGES
	+ E.has_changes

	@@
	expression E;
	@@
	- E.QUICK
	+ E.quick

	@@
	expression E;
	@@
	- E.NO_INDEX
	+ E.no_index

	@@
	expression E;
	@@
	- E.ALLOW_EXTERNAL
	+ E.allow_external

	@@
	expression E;
	@@
	- E.EXIT_WITH_STATUS
	+ E.exit_with_status

	@@
	expression E;
	@@
	- E.REVERSE_DIFF
	+ E.reverse_diff

	@@
	expression E;
	@@
	- E.CHECK_FAILED
	+ E.check_failed

	@@
	expression E;
	@@
	- E.RELATIVE_NAME
	+ E.relative_name

	@@
	expression E;
	@@
	- E.IGNORE_SUBMODULES
	+ E.ignore_submodules

	@@
	expression E;
	@@
	- E.DIRSTAT_CUMULATIVE
	+ E.dirstat_cumulative

	@@
	expression E;
	@@
	- E.DIRSTAT_BY_FILE
	+ E.dirstat_by_file

	@@
	expression E;
	@@
	- E.ALLOW_TEXTCONV
	+ E.allow_textconv

	@@
	expression E;
	@@
	- E.TEXTCONV_SET_VIA_CMDLINE
	+ E.textconv_set_via_cmdline

	@@
	expression E;
	@@
	- E.DIFF_FROM_CONTENTS
	+ E.diff_from_contents

	@@
	expression E;
	@@
	- E.DIRTY_SUBMODULES
	+ E.dirty_submodules

	@@
	expression E;
	@@
	- E.IGNORE_UNTRACKED_IN_SUBMODULES
	+ E.ignore_untracked_in_submodules

	@@
	expression E;
	@@
	- E.IGNORE_DIRTY_SUBMODULES
	+ E.ignore_dirty_submodules

	@@
	expression E;
	@@
	- E.OVERRIDE_SUBMODULE_CONFIG
	+ E.override_submodule_config

	@@
	expression E;
	@@
	- E.DIRSTAT_BY_LINE
	+ E.dirstat_by_line

	@@
	expression E;
	@@
	- E.FUNCCONTEXT
	+ E.funccontext

	@@
	expression E;
	@@
	- E.PICKAXE_IGNORE_CASE
	+ E.pickaxe_ignore_case

	@@
	expression E;
	@@
	- E.DEFAULT_FOLLOW_RENAMES
	+ E.default_follow_renames

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: remove DIFF_OPT_TST macro</title>
<updated>2017-11-01T02:50:03Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-10-31T18:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b69daed861daec1923c369d59c97e46eb3c3d7b'/>
<id>urn:sha1:3b69daed861daec1923c369d59c97e46eb3c3d7b</id>
<content type='text'>
Remove the `DIFF_OPT_TST` macro and instead access the flags directly.
This conversion is done using the following semantic patch:

	@@
	expression E;
	identifier fld;
	@@
	- DIFF_OPT_TST(&amp;E, fld)
	+ E.flags.fld

	@@
	type T;
	T *ptr;
	identifier fld;
	@@
	- DIFF_OPT_TST(ptr, fld)
	+ ptr-&gt;flags.fld

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>log: handle broken HEAD in decoration check</title>
<updated>2017-10-21T12:29:37Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-10-19T17:49:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d79be4983bdf6598f106710a4826752a96f5dd58'/>
<id>urn:sha1:d79be4983bdf6598f106710a4826752a96f5dd58</id>
<content type='text'>
The resolve_ref_unsafe() function may return NULL even with
a REF_ISSYMREF flag if a symref points to a broken ref. As a
result, it's possible for the decoration code's "is this
branch the current HEAD" check to segfault when it passes
the NULL to starts_with().

This is unlikely in practice, since we can only reach this
code if we already resolved HEAD to a matching sha1 earlier.
But it's possible if HEAD racily becomes broken, or if
there's a transient filesystem error.

We can fix this by returning early in the broken case, since
NULL could not possibly match any of our branch names.

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>refs: pass NULL to resolve_ref_unsafe() if hash is not needed</title>
<updated>2017-09-24T01:18:21Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-09-23T09:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=744c040b19412fa5075810eb1aced105fad96726'/>
<id>urn:sha1:744c040b19412fa5075810eb1aced105fad96726</id>
<content type='text'>
This allows us to get rid of some write-only variables, among them seven
SHA1 buffers.

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 'bw/config-h'</title>
<updated>2017-06-24T21:28:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-24T21:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f31d23a399d557d687266b4375a0436f920cc051'/>
<id>urn:sha1:f31d23a399d557d687266b4375a0436f920cc051</id>
<content type='text'>
Fix configuration codepath to pay proper attention to commondir
that is used in multi-worktree situation, and isolate config API
into its own header file.

* bw/config-h:
  config: don't implicitly use gitdir or commondir
  config: respect commondir
  setup: teach discover_git_directory to respect the commondir
  config: don't include config.h by default
  config: remove git_config_iter
  config: create config.h
</content>
</entry>
<entry>
<title>config: don't include config.h by default</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2141fc1d20e659810245ec6ca1c143c60e033ec'/>
<id>urn:sha1:b2141fc1d20e659810245ec6ca1c143c60e033ec</id>
<content type='text'>
Stop including config.h by default in cache.h.  Instead only include
config.h in those files which require use of the config system.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-tree: convert diff_tree_sha1 to struct object_id</title>
<updated>2017-06-05T02:23:58Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-05-30T17:31:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66f414f885aa6f44ae9e764bdd3e3cd7bd80c5a3'/>
<id>urn:sha1:66f414f885aa6f44ae9e764bdd3e3cd7bd80c5a3</id>
<content type='text'>
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tree-diff: convert diff_root_tree_sha1 to struct object_id</title>
<updated>2017-06-02T00:36:30Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-05-30T17:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7b8dea0c7570a2028f204498c82c8ca7ec6950e3'/>
<id>urn:sha1:7b8dea0c7570a2028f204498c82c8ca7ec6950e3</id>
<content type='text'>
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
