1
0
mirror of https://github.com/git/git.git synced 2024-09-29 05:01:36 +02:00
Commit Graph

49476 Commits

Author SHA1 Message Date
Rafael Ascensão
65516f586b log: add option to choose which refs to decorate
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=<pattern>` and
`--decorate-refs-exclude=<pattern>` to allow the user to select which
refs are used in decoration.

When "--decorate-refs=<pattern>" is given, only the refs that match the
pattern are used in decoration. The refs that match the pattern when
"--decorate-refs-exclude=<pattern>" 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 '<pattern>' exists, or if ref exists under '<pattern>/'

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

Helped-by: Kevin Daudt <me@ikke.info>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rafael Ascensão <rafa.almas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-22 13:18:59 +09:00
Junio C Hamano
14c63a9dc0 Sync with maint
* maint:
  Almost ready for 2.15.1
2017-11-21 14:11:40 +09:00
Junio C Hamano
719c7020ab RelNotes: the fifth batch for 2.16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21 14:11:06 +09:00
Junio C Hamano
5ed69ca6db Merge branch 'rs/apply-fuzzy-match-fix'
A fix for an ancient bug in "git apply --ignore-space-change" codepath.

* rs/apply-fuzzy-match-fix:
  apply: avoid out-of-bounds access in fuzzy_matchlines()
2017-11-21 14:07:52 +09:00
Junio C Hamano
1a5f2e4431 Merge branch 'ad/submitting-patches-title-decoration'
Doc update around use of "format-patch --subject-prefix" etc.

* ad/submitting-patches-title-decoration:
  doc/SubmittingPatches: correct subject guidance
2017-11-21 14:07:51 +09:00
Junio C Hamano
c9fdbca92c Merge branch 'av/fsmonitor'
Various fixes to bp/fsmonitor topic.

* av/fsmonitor:
  fsmonitor: simplify determining the git worktree under Windows
  fsmonitor: store fsmonitor bitmap before splitting index
  fsmonitor: read from getcwd(), not the PWD environment variable
  fsmonitor: delay updating state until after split index is merged
  fsmonitor: document GIT_TRACE_FSMONITOR
  fsmonitor: don't bother pretty-printing JSON from watchman
  fsmonitor: set the PWD to the top of the working tree
2017-11-21 14:07:51 +09:00
Junio C Hamano
e05336bdda Merge branch 'bp/fsmonitor'
We learned to talk to watchman to speed up "git status" and other
operations that need to see which paths have been modified.

* bp/fsmonitor:
  fsmonitor: preserve utf8 filenames in fsmonitor-watchman log
  fsmonitor: read entirety of watchman output
  fsmonitor: MINGW support for watchman integration
  fsmonitor: add a performance test
  fsmonitor: add a sample integration script for Watchman
  fsmonitor: add test cases for fsmonitor extension
  split-index: disable the fsmonitor extension when running the split index test
  fsmonitor: add a test tool to dump the index extension
  update-index: add fsmonitor support to update-index
  ls-files: Add support in ls-files to display the fsmonitor valid bit
  fsmonitor: add documentation for the fsmonitor extension.
  fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.
  update-index: add a new --force-write-index option
  preload-index: add override to enable testing preload-index
  bswap: add 64 bit endianness helper get_be64
2017-11-21 14:07:50 +09:00
Junio C Hamano
95a731ce92 Almost ready for 2.15.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21 14:07:08 +09:00
Junio C Hamano
1c89be1db2 Merge branch 'rs/sequencer-rewrite-file-cleanup' into maint
Code cleanup.

* rs/sequencer-rewrite-file-cleanup:
  sequencer.c: check return value of close() in rewrite_file()
  sequencer: use O_TRUNC to truncate files
  sequencer: factor out rewrite_file()
2017-11-21 14:05:33 +09:00
Junio C Hamano
01e0c53c73 Merge branch 'cb/t4201-robustify' into maint
A test update.

* cb/t4201-robustify:
  t4201: make use of abbreviation in the test more robust
2017-11-21 14:05:33 +09:00
Junio C Hamano
b2a276830f Merge branch 'tz/fsf-address-update' into maint
Replace the mailing address of FSF to a URL, as FSF prefers.

* tz/fsf-address-update:
  Replace Free Software Foundation address in license notices
  Replace Free Software Foundation address in license notices
2017-11-21 14:05:32 +09:00
Junio C Hamano
8ff22f5a88 Merge branch 'ad/rebase-i-serie-typofix' into maint
Typofix.

* ad/rebase-i-serie-typofix:
  rebase -i: fix comment typo
2017-11-21 14:05:32 +09:00
Junio C Hamano
5a80d1dd9c Merge branch 'jk/info-alternates-fix' into maint
We used to add an empty alternate object database to the system
that does not help anything; it has been corrected.

* jk/info-alternates-fix:
  link_alt_odb_entries: make empty input a noop
2017-11-21 14:05:31 +09:00
Junio C Hamano
8e3e51a3a7 Merge branch 'ab/pcre-v2' into maint
Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed.

* ab/pcre-v2:
  grep: fix NO_LIBPCRE1_JIT to fully disable JIT
2017-11-21 14:05:30 +09:00
Junio C Hamano
b77b96e29b Merge branch 'sr/wrapper-quote-filenames' into maint
Some error messages did not quote filenames shown in it, which have
been fixed.

* sr/wrapper-quote-filenames:
  wrapper.c: consistently quote filenames in error messages
2017-11-21 14:05:29 +09:00
Junio C Hamano
6baa11dc2a Merge branch 'bw/rebase-i-ignored-submodule-fix' into maint
"git rebase -i" recently started misbehaving when a submodule that
is configured with 'submodule.<name>.ignore' is dirty; this has
been corrected.

* bw/rebase-i-ignored-submodule-fix:
  wt-status: actually ignore submodules when requested
2017-11-21 14:05:29 +09:00
Jeff King
f5da077b1f git-jump: give contact instructions in the README
Let's make it clear how patches should flow into
contrib/git-jump. The normal Git maintainer does not
necessarily care about things in contrib/, and authors of
individual components should be the ones giving the final
review/ack for a patch. Ditto for bug reports, which are
likely to get more attention from the area expert.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21 11:01:02 +09:00
Beat Bolli
007d06aa57 contrib/git-jump: allow to configure the grep command
Add the configuration option "jump.grepCmd" that allows to configure the
command that is used to search in grep mode. This allows the users of
git-jump to use ag(1) or ack(1) as search engines.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21 11:00:27 +09:00
Junio C Hamano
89ea799ffc Sync with maint 2017-11-15 12:17:43 +09:00
Junio C Hamano
3505ddecbd RelNotes: the fourth batch for 2.16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-15 12:17:08 +09:00
Junio C Hamano
e539a83455 Merge branch 'bp/read-index-from-skip-verification'
Drop (perhaps overly cautious) sanity check before using the index
read from the filesystem at runtime.

* bp/read-index-from-skip-verification:
  read_index_from(): speed index loading by skipping verification of the entry order
2017-11-15 12:14:37 +09:00
Junio C Hamano
36d75581a4 Merge branch 'bc/submitting-patches-in-asciidoc'
The SubmittingPatches document has been converted to produce an
HTML version via AsciiDoc/Asciidoctor.

* bc/submitting-patches-in-asciidoc:
  Documentation: convert SubmittingPatches to AsciiDoc
  Documentation: enable compat-mode for Asciidoctor
2017-11-15 12:14:36 +09:00
Junio C Hamano
5066a008bb Merge branch 'sb/bisect-run-empty'
"git bisect run" that did not specify any command to run used to go
ahead and treated all commits to be tested as 'good'.  This has
been corrected by making the command error out.

* sb/bisect-run-empty:
  bisect run: die if no command is given
2017-11-15 12:14:36 +09:00
Junio C Hamano
69bfdc614e Merge branch 'rd/bisect-view-is-visualize'
Doc and message updates to teach users "bisect view" is a synonym
for "bisect visualize".

* rd/bisect-view-is-visualize:
  bisect: mention "view" as an alternative to "visualize"
2017-11-15 12:14:36 +09:00
Junio C Hamano
26a45eac80 Merge branch 'jk/info-alternates-fix'
We used to add an empty alternate object database to the system
that does not help anything; it has been corrected.

* jk/info-alternates-fix:
  link_alt_odb_entries: make empty input a noop
2017-11-15 12:14:36 +09:00
Junio C Hamano
4fff9c7f30 Merge branch 'cb/t4201-robustify'
A test update.

* cb/t4201-robustify:
  t4201: make use of abbreviation in the test more robust
2017-11-15 12:14:35 +09:00
Junio C Hamano
2620b47794 Merge branch 'ab/pcre-v2'
Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed.

* ab/pcre-v2:
  grep: fix NO_LIBPCRE1_JIT to fully disable JIT
2017-11-15 12:14:34 +09:00
Junio C Hamano
f13b8ec25e Merge branch 'tz/fsf-address-update'
* tz/fsf-address-update:
  Replace Free Software Foundation address in license notices
  Replace Free Software Foundation address in license notices
2017-11-15 12:14:34 +09:00
Junio C Hamano
f68337d1ed Merge branch 'ad/rebase-i-serie-typofix'
* ad/rebase-i-serie-typofix:
  rebase -i: fix comment typo
2017-11-15 12:14:33 +09:00
Junio C Hamano
5c22d53bfb Merge branch 'ab/mediawiki-namespace'
The remote-helper for talking to MediaWiki has been updated to
work with mediawiki namespaces.

* ab/mediawiki-namespace:
  remote-mediawiki: show progress while fetching namespaces
  remote-mediawiki: process namespaces in order
  remote-mediawiki: support fetching from (Main) namespace
  remote-mediawiki: skip virtual namespaces
  remote-mediawiki: show known namespace choices on failure
  remote-mediawiki: allow fetching namespaces with spaces
  remote-mediawiki: add namespace support
2017-11-15 12:14:32 +09:00
Junio C Hamano
905f16dd02 Merge branch 'ma/reduce-heads-leakfix'
Leak fixes.

* ma/reduce-heads-leakfix:
  reduce_heads: fix memory leaks
  builtin/merge-base: free commit lists
2017-11-15 12:14:32 +09:00
Junio C Hamano
093048b229 Merge branch 'js/for-each-ref-remote-name-and-ref'
The "--format=..." option "git for-each-ref" takes learned to show
the name of the 'remote' repository and the ref at the remote side
that is affected for 'upstream' and 'push' via "%(push:remotename)"
and friends.

* js/for-each-ref-remote-name-and-ref:
  for-each-ref: test :remotename and :remoteref
  for-each-ref: let upstream/push report the remote ref name
  for-each-ref: let upstream/push optionally report the remote name
2017-11-15 12:14:32 +09:00
Junio C Hamano
1eb2bd939a Merge branch 'jt/submodule-tests-cleanup'
* jt/submodule-tests-cleanup:
  Tests: clean up and document submodule helpers
2017-11-15 12:14:31 +09:00
Junio C Hamano
563b0610d6 Merge branch 'cc/git-packet-pm'
Parts of a test to drive the long-running content filter interface
has been split into its own module, hopefully to eventually become
reusable.

* cc/git-packet-pm:
  Git/Packet.pm: extract parts of t0021/rot13-filter.pl for reuse
  t0021/rot13-filter: add capability functions
  t0021/rot13-filter: refactor checking final lf
  t0021/rot13-filter: add packet_initialize()
  t0021/rot13-filter: improve error message
  t0021/rot13-filter: improve 'if .. elsif .. else' style
  t0021/rot13-filter: refactor packet reading functions
  t0021/rot13-filter: fix list comparison
2017-11-15 12:14:31 +09:00
Junio C Hamano
b50d82b00a Merge branch 'bw/rebase-i-ignored-submodule-fix'
"git rebase -i" recently started misbehaving when a submodule that
is configured with 'submodule.<name>.ignore' is dirty; this has
been corrected.

* bw/rebase-i-ignored-submodule-fix:
  wt-status: actually ignore submodules when requested
2017-11-15 12:14:30 +09:00
Junio C Hamano
a97222978a Merge branch 'mh/tidy-ref-update-flags'
Code clean-up in refs API implementation.

* mh/tidy-ref-update-flags:
  refs: update some more docs to use "oid" rather than "sha1"
  write_packed_entry(): take `object_id` arguments
  refs: rename constant `REF_ISPRUNING` to `REF_IS_PRUNING`
  refs: rename constant `REF_NODEREF` to `REF_NO_DEREF`
  refs: tidy up and adjust visibility of the `ref_update` flags
  ref_transaction_add_update(): remove a check
  ref_transaction_update(): die on disallowed flags
  prune_ref(): call `ref_transaction_add_update()` directly
  files_transaction_prepare(): don't leak flags to packed transaction
2017-11-15 12:14:29 +09:00
Junio C Hamano
61f68f6073 Merge branch 'sr/wrapper-quote-filenames'
Some error messages did not quote filenames shown in it, which have
been fixed.

* sr/wrapper-quote-filenames:
  wrapper.c: consistently quote filenames in error messages
2017-11-15 12:14:29 +09:00
Junio C Hamano
f116163171 Merge branch 'ma/bisect-leakfix'
Leak fixes.

* ma/bisect-leakfix:
  bisect: fix memory leak when returning best element
  bisect: fix off-by-one error in `best_bisection_sorted()`
  bisect: fix memory leak in `find_bisection()`
  bisect: change calling-convention of `find_bisection()`
2017-11-15 12:14:28 +09:00
Junio C Hamano
6fa1f6f16f Merge branch 'rs/sequencer-rewrite-file-cleanup'
Code cleanup.

* rs/sequencer-rewrite-file-cleanup:
  sequencer.c: check return value of close() in rewrite_file()
  sequencer: use O_TRUNC to truncate files
  sequencer: factor out rewrite_file()
2017-11-15 12:14:28 +09:00
Junio C Hamano
a6ee796aa8 Merge branch 'ao/merge-verbosity-getenv-just-once'
Code cleanup.

* ao/merge-verbosity-getenv-just-once:
  merge-recursive: check GIT_MERGE_VERBOSITY only once
2017-11-15 12:14:28 +09:00
Junio C Hamano
ffb0b5762e Merge branch 'mh/avoid-rewriting-packed-refs'
Recent update to the refs infrastructure implementation started
rewriting packed-refs file more often than before; this has been
optimized again for most trivial cases.

* mh/avoid-rewriting-packed-refs:
  files-backend: don't rewrite the `packed-refs` file unnecessarily
  t1409: check that `packed-refs` is not rewritten unnecessarily
2017-11-15 12:14:27 +09:00
Junio C Hamano
d4a5de7bde Merge branch 'rs/imap-send-next-arg-fix'
Error checking in "git imap-send" for empty response has been
improved.

* rs/imap-send-next-arg-fix:
  imap-send: handle missing response codes gracefully
  imap-send: handle NULL return of next_arg()
2017-11-15 12:14:26 +09:00
Junio C Hamano
fcaba62192 Merge branch 'ab/mediawiki-name-truncation'
The remote-helper for talking to MediaWiki has been updated to
truncate an overlong pagename so that ".mw" suffix can still be
added.

* ab/mediawiki-name-truncation:
  remote-mediawiki: limit filenames to legal
2017-11-15 12:14:26 +09:00
Junio C Hamano
5a1f5c3060 Start preparation for 2.15.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-15 12:05:22 +09:00
Junio C Hamano
266b87b90b Merge branch 'ks/mailmap' into maint
* ks/mailmap:
  mailmap: use Kaartic Sivaraam's new address
2017-11-15 12:05:04 +09:00
Junio C Hamano
2d35c507d2 Merge branch 'jm/relnotes-2.15-typofix' into maint
Typofix.

* jm/relnotes-2.15-typofix:
  fix typos in 2.15.0 release notes
2017-11-15 12:05:04 +09:00
Junio C Hamano
da2b4ee388 Merge branch 'cn/diff-indent-no-longer-is-experimental' into maint
Doc update.

* cn/diff-indent-no-longer-is-experimental:
  diff: --indent-heuristic is no longer experimental
2017-11-15 12:05:04 +09:00
Junio C Hamano
74ef46558e Merge branch 'js/mingw-redirect-std-handles' into maint
MinGW updates.

* js/mingw-redirect-std-handles:
  mingw: document the standard handle redirection
  mingw: optionally redirect stderr/stdout via the same handle
  mingw: add experimental feature to redirect standard handles
2017-11-15 12:05:03 +09:00
Junio C Hamano
558d8568df Merge branch 'js/wincred-empty-cred' into maint
MinGW updates.

* js/wincred-empty-cred:
  wincred: handle empty username/password correctly
  t0302: check helper can handle empty credentials
2017-11-15 12:05:03 +09:00
Junio C Hamano
40bc898103 Merge branch 'js/mingw-full-version-in-resources' into maint
MinGW updates.

* js/mingw-full-version-in-resources:
  mingw: include the full version information in the resources
2017-11-15 12:05:03 +09:00