1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 01:16:12 +02:00
Commit Graph

12528 Commits

Author SHA1 Message Date
Elijah Newren 7fcb965970 RelNotes/2.26.0: fix various typos
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-18 15:42:37 -07:00
Junio C Hamano be8661a328 Git 2.25.2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAl5xSg0ACgkQsLXohpav
 5suNcw//cAfPWi2SU7zYNfylcBew7r21WQpqRvip+0s5vc5Pgj8tZEsFTDCl4ARR
 0W7yaAoR4te/imLkGnij6tvEmuJMb+McQJYKQA5EqrkigloEy36dCYrDbA/saRa1
 SSXp6P4zwl4iAPYa31AIZImhnI1a3pIzv3aYKEA3ecCG++vPxeW5a7frqIggvMJG
 g1SvCsjEqU6agRCePKjBZ6rbl7OJMnZGt+mfW1ymfCu+37NC5ubC3vSsAcy4SqVA
 KVmwe63NygnxczGvda/J4q2FO/Qb4OyvItdtrHMGwoy1MkldFCebmfkd+HBHHo5f
 Pg5lWcgf91YtEw98DSHRlFbXwMokxac8fiIX+X4m742Nu61BVgHff+EOJNeVuiV3
 xe1ks51BQP6S6IZBXNg0CndmfVls8lbnWomfuYpLPraLRAGHm7eoTJz6/J0FnbVt
 LkDvKG7kyYcqswAlMKcSjQkxdzYg9lJPxM7KOaNF6XmKDnV4KJNBeu+1q456c9OF
 e10tiqQRyXwPPXxJtLcCCiAtb1oua7D9OPmBSYxXvoTeOqq3HtVuOVdQGJXpYvqV
 oGjx738AvFPXnsSybca+gkxAWzC6fDbyIJfqFO3dIIgsHqbyYQPRlrUG+4vPG9wc
 UZdK3XMNQ3K+EPABV0LhbgC0B7dU2n5NmKLNWF4TsZ/If5cySiU=
 =RZCX
 -----END PGP SIGNATURE-----

Sync with Git 2.25.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-17 15:27:15 -07:00
Junio C Hamano 0822e66b5d Git 2.25.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-17 15:06:37 -07:00
Junio C Hamano 221887a492 Merge branch 'jk/doc-credential-helper' into maint
Docfix.

* jk/doc-credential-helper:
  doc: move credential helper info into gitcredentials(7)
2020-03-17 15:02:26 -07:00
Junio C Hamano fda2baffd2 Merge branch 'jc/doc-single-h-is-for-help' into maint
Both "git ls-remote -h" and "git grep -h" give short usage help,
like any other Git subcommand, but it is not unreasonable to expect
that the former would behave the same as "git ls-remote --head"
(there is no other sensible behaviour for the latter).  The
documentation has been updated in an attempt to clarify this.

* jc/doc-single-h-is-for-help:
  Documentation: clarify that `-h` alone stands for `help`
2020-03-17 15:02:24 -07:00
Junio C Hamano 16a4bf1035 Merge branch 'en/check-ignore' into maint
"git check-ignore" did not work when the given path is explicitly
marked as not ignored with a negative entry in the .gitignore file.

* en/check-ignore:
  check-ignore: fix documentation and implementation to match
2020-03-17 15:02:23 -07:00
Junio C Hamano 3246495a5c Merge branch 'jk/push-option-doc-markup-fix' into maint
Doc markup fix.

* jk/push-option-doc-markup-fix:
  doc/config/push: use longer "--" line for preformatted example
2020-03-17 15:02:22 -07:00
Junio C Hamano 56f97d5896 Merge branch 'jk/doc-diff-parallel' into maint
Update to doc-diff.

* jk/doc-diff-parallel:
  doc-diff: use single-colon rule in rendering Makefile
2020-03-17 15:02:22 -07:00
Junio C Hamano 6c85aac65f Git 2.26-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-16 12:46:32 -07:00
Junio C Hamano 30e9940356 Hopefully the final batch before -rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-12 14:36:00 -07:00
Junio C Hamano b4f0038525 Merge branch 'en/rebase-backend'
Band-aid fixes for two fallouts from switching the default "rebase"
backend.

* en/rebase-backend:
  git-rebase.txt: highlight backend differences with commit rewording
  sequencer: clear state upon dropping a become-empty commit
  i18n: unmark a message in rebase.c
2020-03-12 14:28:01 -07:00
Elijah Newren 120b1eb731 git-rebase.txt: highlight backend differences with commit rewording
As noted by Junio:
    Back when "git am" was written, it was not considered a bug that the
    "git am --resolved" option did not offer the user a chance to update
    the log message to match the adjustment of the code the user made,
    but honestly, I'd have to say that it is a bug in "git am" in that
    over time it wasn't adjusted to the new world order where we
    encourage users to describe what they did when the automation
    hiccuped by opening an editor.  These days, even when automation
    worked well (e.g. a clean auto-merge with "git merge"), we open an
    editor.  The world has changed, and so should the expectations.

Junio also suggested providing a workaround such as allowing --no-edit
together with git rebase --continue, but that should probably be done in
a patch after the git-2.26.0 release.  For now, just document the known
difference in the Behavioral Differences section.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-11 12:11:08 -07:00
Junio C Hamano cdef998b46 Merge branch 'jc/doc-single-h-is-for-help'
Both "git ls-remote -h" and "git grep -h" give short usage help,
like any other Git subcommand, but it is not unreasonable to expect
that the former would behave the same as "git ls-remote --head"
(there is no other sensible behaviour for the latter).  The
documentation has been updated in an attempt to clarify this.

* jc/doc-single-h-is-for-help:
  Documentation: clarify that `-h` alone stands for `help`
2020-03-11 10:58:16 -07:00
Junio C Hamano b4374e96c8 Git 2.26-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-09 11:21:21 -07:00
Junio C Hamano 0e0d717537 Merge branch 'pb/am-show-current-patch'
"git am --short-current-patch" is a way to show the piece of e-mail
for the stopped step, which is not suitable to directly feed "git
apply" (it is designed to be a good "git am" input).  It learned a
new option to show only the patch part.

* pb/am-show-current-patch:
  am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch
  am: support --show-current-patch=raw as a synonym for--show-current-patch
  am: convert "resume" variable to a struct
  parse-options: convert "command mode" to a flag
  parse-options: add testcases for OPT_CMDMODE()
2020-03-09 11:21:19 -07:00
Junio C Hamano 9b7f726dfc Merge branch 'am/pathspec-f-f-more'
"git rm" and "git stash" learns the new "--pathspec-from-file"
option.

* am/pathspec-f-f-more:
  stash push: support the --pathspec-from-file option
  stash: eliminate crude option parsing
  doc: stash: synchronize <pathspec> description
  doc: stash: document more options
  doc: stash: split options from description (2)
  doc: stash: split options from description (1)
  rm: support the --pathspec-from-file option
  doc: rm: synchronize <pathspec> description
2020-03-09 11:21:19 -07:00
Junio C Hamano 076cbdcd73 Git 2.26-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-05 11:15:45 -08:00
Junio C Hamano b22db265d6 Merge branch 'es/recursive-single-branch-clone'
"git clone --recurse-submodules --single-branch" now uses the same
single-branch option when cloning the submodules.

* es/recursive-single-branch-clone:
  clone: pass --single-branch during --recurse-submodules
  submodule--helper: use C99 named initializer
2020-03-05 10:43:03 -08:00
Junio C Hamano 2cbb058669 Merge branch 'bc/wildcard-credential'
A configuration element used for credential subsystem can now use
wildcard pattern to specify for which set of URLs the entry
applies.

* bc/wildcard-credential:
  credential: allow wildcard patterns when matching config
  credential: use the last matching username in the config
  t0300: add tests for some additional cases
  t1300: add test for urlmatch with multiple wildcards
  mailmap: add an additional email address for brian m. carlson
2020-03-05 10:43:02 -08:00
Junio C Hamano f4d7dfce4d Merge branch 'ds/sparse-add'
"git sparse-checkout" learned a new "add" subcommand.

* ds/sparse-add:
  sparse-checkout: allow one-character directories in cone mode
  sparse-checkout: work with Windows paths
  sparse-checkout: create 'add' subcommand
  sparse-checkout: extract pattern update from 'set' subcommand
  sparse-checkout: extract add_patterns_from_input()
2020-03-05 10:43:02 -08:00
Junio C Hamano 2f268890c2 The eighth batch for 2.26
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-02 15:07:40 -08:00
Junio C Hamano 8c22bd9ff9 Merge branch 'en/rebase-backend'
"git rebase" has learned to use the merge backend (i.e. the
machinery that drives "rebase -i") by default, while allowing
"--apply" option to use the "apply" backend (e.g. the moral
equivalent of "format-patch piped to am").  The rebase.backend
configuration variable can be set to customize.

* en/rebase-backend:
  rebase: rename the two primary rebase backends
  rebase: change the default backend from "am" to "merge"
  rebase: make the backend configurable via config setting
  rebase tests: repeat some tests using the merge backend instead of am
  rebase tests: mark tests specific to the am-backend with --am
  rebase: drop '-i' from the reflog for interactive-based rebases
  git-prompt: change the prompt for interactive-based rebases
  rebase: add an --am option
  rebase: move incompatibility checks between backend options a bit earlier
  git-rebase.txt: add more details about behavioral differences of backends
  rebase: allow more types of rebases to fast-forward
  t3432: make these tests work with either am or merge backends
  rebase: fix handling of restrict_revision
  rebase: make sure to pass along the quiet flag to the sequencer
  rebase, sequencer: remove the broken GIT_QUIET handling
  t3406: simplify an already simple test
  rebase (interactive-backend): fix handling of commits that become empty
  rebase (interactive-backend): make --keep-empty the default
  t3404: directly test the behavior of interest
  git-rebase.txt: update description of --allow-empty-message
2020-03-02 15:07:19 -08:00
Junio C Hamano cb2f5a8e97 Merge branch 'en/check-ignore'
"git check-ignore" did not work when the given path is explicitly
marked as not ignored with a negative entry in the .gitignore file.

* en/check-ignore:
  check-ignore: fix documentation and implementation to match
2020-03-02 15:07:18 -08:00
Junio C Hamano 80648bb3f2 Merge branch 'jk/push-option-doc-markup-fix'
Doc markup fix.

* jk/push-option-doc-markup-fix:
  doc/config/push: use longer "--" line for preformatted example
2020-03-02 15:07:18 -08:00
Junio C Hamano 29b09c518c Merge branch 'jk/doc-diff-parallel'
Update to doc-diff.

* jk/doc-diff-parallel:
  doc-diff: use single-colon rule in rendering Makefile
2020-03-02 15:07:17 -08:00
Junio C Hamano 1ff466c018 Documentation: clarify that `-h` alone stands for `help`
We seem to be getting new users who get confused every 20 months or
so with this "-h consistently wants to give help, but the commands
to which `-h` may feel like a good short-form option want it to mean
something else." compromise.

Let's make sure that the readers know that `git cmd -h` (with no
other arguments) is a way to get usage text, even for commands like
ls-remote and grep.

Also extend the description that is already in gitcli.txt, as it is
clear that users still get confused with the current text.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-27 14:14:01 -08:00
Junio C Hamano 2d2118b814 The seventh batch for 2.26
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-25 11:18:32 -08:00
Junio C Hamano 325eb66830 Merge branch 'es/doc-mentoring'
Doc for new contributors.

* es/doc-mentoring:
  MyFirstContribution: rephrase contact info
  MyFirstContribution: add avenues for getting help
2020-02-25 11:18:32 -08:00
Junio C Hamano 87f17d790d Merge branch 'es/bright-colors'
The basic 7 colors learned the brighter counterparts
(e.g. "brightred").

* es/bright-colors:
  color.c: alias RGB colors 8-15 to aixterm colors
  color.c: support bright aixterm colors
  color.c: refactor color_output arguments
2020-02-25 11:18:32 -08:00
Junio C Hamano d0038f4b31 Merge branch 'bw/remote-rename-update-config'
"git remote rename X Y" needs to adjust configuration variables
(e.g. branch.<name>.remote) whose value used to be X to Y.
branch.<name>.pushRemote is now also updated.

* bw/remote-rename-update-config:
  remote rename/remove: gently handle remote.pushDefault config
  config: provide access to the current line number
  remote rename/remove: handle branch.<name>.pushRemote config values
  remote: clean-up config callback
  remote: clean-up by returning early to avoid one indentation
  pull --rebase/remote rename: document and honor single-letter abbreviations rebase types
2020-02-25 11:18:32 -08:00
Emily Shaffer 132f600b06 clone: pass --single-branch during --recurse-submodules
Previously, performing "git clone --recurse-submodules --single-branch"
resulted in submodules cloning all branches even though the superproject
cloned only one branch. Pipe --single-branch through the submodule
helper framework to make it to 'clone' later on.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-25 10:00:38 -08:00
Paolo Bonzini aa416b22ea am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch
When "git am --show-current-patch" was added in commit 984913a210 ("am:
add --show-current-patch", 2018-02-12), "git am" started recommending it
as a replacement for .git/rebase-merge/patch.  Unfortunately the suggestion
is somewhat misguided; for example, the output of "git am --show-current-patch"
cannot be passed to "git apply" if it is encoded as quoted-printable
or base64.  Add a new mode to "git am --show-current-patch" in order to
straighten the suggestion.

Reported-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-20 13:20:41 -08:00
Paolo Bonzini f3b4822899 am: support --show-current-patch=raw as a synonym for--show-current-patch
When "git am --show-current-patch" was added in commit 984913a210 ("am:
add --show-current-patch", 2018-02-12), "git am" started recommending it
as a replacement for .git/rebase-merge/patch.  Unfortunately the suggestion
is somewhat misguided; for example, the output "git am --show-current-patch"
cannot be passed to "git apply" if it is encoded as quoted-printable or
base64.  To simplify worktree operations and to avoid that users poke into
.git, it would be better if "git am" also provided a mode that copies
.git/rebase-merge/patch to stdout.

One possibility could be to have completely separate options, introducing
for example --show-current-message (for .git/rebase-apply/NNNN)
and --show-current-diff (for .git/rebase-apply/patch), while possibly
deprecating --show-current-patch.

That would even remove the need for the first two patches in the series.
However, the long common prefix would have prevented using an abbreviated
option such as "--show".  Therefore, I chose instead to add a string
argument to --show-current-patch.  The new argument is optional, so that
"git am --show-current-patch"'s behavior remains backwards-compatible.

The next choice to make is how to handle multiple --show-current-patch
options.  Right now, something like "git am --abort --show-current-patch"
is rejected, and the previous suggestion would likewise have naturally
rejected a command line like

	git am --show-current-message --show-current-diff

Therefore, I decided to also reject for example

	git am --show-current-patch=diff --show-current-patch=raw

In other words the whole of --show-current-patch=xxx (including the
optional argument) is treated as the command mode.  I found this to be
more consistent and intuitive, even though it differs from the usual
"last one wins" semantics of the git command line.

Add the code to parse submodes based on the above design, where for now
"raw" is the only valid submode.  "raw" prints the full e-mail message
just like "git am --show-current-patch".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-20 13:20:40 -08:00
brian m. carlson 46fd7b3900 credential: allow wildcard patterns when matching config
In some cases, a user will want to use a specific credential helper for
a wildcard pattern, such as https://*.corp.example.com.  We have code
that handles this already with the urlmatch code, so let's use that
instead of our custom code.

Since the urlmatch code is a superset of our current matching in terms
of capabilities, there shouldn't be any cases of things that matched
previously that don't match now.  However, in addition to wildcard
matching, we now use partial path matching, which can cause slightly
different behavior in the case that a helper applies to the prefix
(considering path components) of the remote URL.  While different, this
is probably the behavior people were wanting anyway.

Since we're using the urlmatch code, we need to encode the components
we've gotten into a URL to match, so add a function to percent-encode
data and format the URL with it.  We now also no longer need to the
custom code to match URLs, so let's remove it.

Additionally, the urlmatch code always looks for the best match, whereas
we want all matches for credential helpers to preserve existing
behavior.  Let's add an optional field, select_fn, that lets us control
which items we want (in this case, all of them) and default it to the
best-match code that already exists for other users.

Signed-off-by: brian m. carlson <bk2204@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-20 13:05:43 -08:00
Alexandr Miloslavskiy 8a98758a8d stash push: support the --pathspec-from-file option
Decisions taken for simplicity:
1) For now, `--pathspec-from-file` is declared incompatible with
   `--patch`, even when <file> is not `-`. Such use case is not
   really expected.
2) It is not allowed to pass pathspec in both args and file.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-19 10:56:49 -08:00
Alexandr Miloslavskiy 3f3d8068f5 doc: stash: synchronize <pathspec> description
This patch continues the effort that is already applied to
`git commit`, `git reset`, `git checkout` etc.

1) Added reference to 'linkgit:gitglossary[7]'.
2) Fixed mentions of incorrectly plural "pathspecs".

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-19 10:56:49 -08:00
Alexandr Miloslavskiy b22909144c doc: stash: document more options
Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-19 10:56:49 -08:00
Alexandr Miloslavskiy 0093abc286 doc: stash: split options from description (2)
Together with the previous patch, this brings docs for `git stash` to
the common layout used for most other commands (see for example docs
for `git add`, `git commit`, `git checkout`, `git reset`) where all
options are documented in a separate list.

After some thinking and having a look at docs for `git svn` and
`git `submodule`, I have arrived at following conclusions:
  * Options should be described in a list rather then text to
    facilitate lookup for user.
  * Single list is better then multiple lists because it avoids
    copy&pasting descriptions between subcommands (or, without
    copy&pasting, user will have to look up missing options in other
    subcommands).
  * As a consequence, commands section should only give brief info and
    list possible options. Since options have good enough names, user
	will only need to look up the "interesting" options.
  * Every option should list which subcommands support it.

I have decided to use alphabetical sorting in the list of options to
facilitate lookup for user.

There is some text editing done to make old descriptions better fit
into the list-style format.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-19 10:56:49 -08:00
Alexandr Miloslavskiy 2b7460d167 doc: stash: split options from description (1)
This patch moves blocks of text as-is to make it easier to review the
next patch.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-19 10:56:49 -08:00
Alexandr Miloslavskiy 5f393dc3aa rm: support the --pathspec-from-file option
Decisions taken for simplicity:
1) It is not allowed to pass pathspec in both args and file.

Adjustments were needed for `if (!argc)` block:

This code actually means "pathspec is not present". Previously, pathspec
could only come from commandline arguments, so testing for `argc` was a
valid way of testing for the presence of pathspec. But this is no longer
true with `--pathspec-from-file`.

During the entire `--pathspec-from-file` story, I tried to keep its
behavior very close to giving pathspec on commandline, so that switching
from one to another doesn't involve any surprises.

However, throwing usage at user in the case of empty
`--pathspec-from-file` would puzzle because there's nothing wrong with
"usage" (that is, argc/argv array).

On the other hand, throwing usage in the old case also feels bad to me.
While it's less of a puzzle, I (as user) never liked the experience of
comparing my commandline to "usage", trying to spot a difference. Since
it's already known what the error is, it feels a lot better to give that
specific error to user.

Judging from [1] it doesn't seem that showing usage in this case was
important (the patch was to avoid segfault), and it doesn't fit into how
other commands react to empty pathspec (see for example `git add` with a
custom message).

Therefore, I decided to show new error text in both cases. In order to
continue testing for error early, I moved `parse_pathspec()` higher. Now
it happens before `read_cache()` / `hold_locked_index()` /
`setup_work_tree()`, which shouldn't cause any issues.

[1] Commit 7612a1ef ("git-rm: honor -n flag" 2006-06-09)

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-19 10:56:49 -08:00
Elijah Newren 7ec8125fba check-ignore: fix documentation and implementation to match
check-ignore has two different modes, and neither of these modes has an
implementation that matches the documentation.  These modes differ in
whether they just print paths or whether they also print the final
pattern matched by the path.  The fix is different for both modes, so
I'll discuss both separately.

=== First (default) mode ===

The first mode is documented as:

    For each pathname given via the command-line or from a file via
    --stdin, check whether the file is excluded by .gitignore (or other
    input files to the exclude mechanism) and output the path if it is
    excluded.

However, it fails to do this because it did not account for negated
patterns.  Commands other than check-ignore verify exclusion rules via
calling

   ... -> treat_one_path() -> is_excluded() -> last_matching_pattern()

while check-ignore has a call path of the form:

   ... -> check_ignore()                    -> last_matching_pattern()

The fact that the latter does not include the call to is_excluded()
means that it is susceptible to to messing up negated patterns (since
that is the only significant thing is_excluded() adds over
last_matching_pattern()).  Unfortunately, we can't make it just call
is_excluded(), because the same codepath is used by the verbose mode
which needs to know the matched pattern in question.  This brings us
to...

=== Second (verbose) mode ===

The second mode, known as verbose mode, references the first in the
documentation and says:

    Also output details about the matching pattern (if any) for each
    given pathname. For precedence rules within and between exclude
    sources, see gitignore(5).

The "Also" means it will print patterns that match the exclude rules as
noted for the first mode, and also print which pattern matches.  Unless
more information is printed than just pathname and pattern (which is not
done), this definition is somewhat ill-defined and perhaps even
self-contradictory for negated patterns: A path which matches a negated
exclude pattern is NOT excluded and thus shouldn't be printed by the
former logic, while it certainly does match one of the explicit patterns
and thus should be printed by the latter logic.

=== Resolution ==

Since the second mode exists to find out which pattern matches given
paths, and showing the user a pattern that begins with a '!' is
sufficient for them to figure out whether the pattern is excluded, the
existing behavior is desirable -- we just need to update the
documentation to match the implementation (i.e. it is about printing
which pattern is matched by paths, not about showing which paths are
excluded).

For the first or default mode, users just want to know whether a pattern
is excluded.  As such, the existing documentation is desirable; change
the implementation to match the documented behavior.

Finally, also adjust a few tests in t0008 that were caught up by this
discrepancy in how negated paths were handled.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-18 15:28:58 -08:00
Jeff King 2607d39da3 doc-diff: use single-colon rule in rendering Makefile
When rendering the troff manpages to text via "man", we create an ad-hoc
Makefile and feed it to "make". The purpose here is two-fold:

  - reuse results from a prior interrupted render of the same tree

  - use make's -j option to build in parallel

But the second part doesn't seem to work (at least with my version of
GNU make, 4.2.1). It just runs one render at a time.

We use a double-colon "all" rule for each file, like:

  all:: foo
  foo:
    ...actual render recipe...
  all:: bar
  bar:
    ...actual render recipe...
  ...and so on...

And it's this double-colon that seems to inhibit the parallelism. We can
just switch to a regular single-colon rule. Even though we do have
multiple rules for "all" here, we don't have any recipe to execute for
"all" (we only care about triggering its dependencies), so the
distinction is irrelevant.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-18 13:53:30 -08:00
Jeff King 0aa6ce3094 doc/config/push: use longer "--" line for preformatted example
The example for the push.pushOption config tries to create a
preformatted section, but uses only two dashes in its "--" line. In
AsciiDoc this is an "open block", with no type; the lines end up jumbled
because they're formatted as paragraphs. We need four or more dashes to
make it a "listing block" that will respect the linebreaks.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-18 13:48:31 -08:00
Junio C Hamano 51ebf55b93 The sixth batch for 2.26
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-17 13:22:19 -08:00
Junio C Hamano 123538444f Merge branch 'jk/doc-credential-helper'
Docfix.

* jk/doc-credential-helper:
  doc: move credential helper info into gitcredentials(7)
2020-02-17 13:22:19 -08:00
Junio C Hamano 5d55554b1d Merge branch 'mr/show-config-scope'
"git config" learned to show in which "scope", in addition to in
which file, each config setting comes from.

* mr/show-config-scope:
  config: add '--show-scope' to print the scope of a config value
  submodule-config: add subomdule config scope
  config: teach git_config_source to remember its scope
  config: preserve scope in do_git_config_sequence
  config: clarify meaning of command line scoping
  config: split repo scope to local and worktree
  config: make scope_name non-static and rename it
  t1300: create custom config file without special characters
  t1300: fix over-indented HERE-DOCs
  config: fix typo in variable name
2020-02-17 13:22:17 -08:00
Junio C Hamano e68e29171c Git 2.25.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAl5KGK8ACgkQsLXohpav
 5stvtw/9EKgXGq3wNoe4TIc0dK7sNlPmwjtZXfypUHrnqTNEd2xs1YBTY9/4FHHS
 ICNamltA9/r5SbkbpGWk++ZK0I2HTTNe0R/xlErljalCpi3IqdvofAYRoUKyA9rj
 JC6bdWJ2Nr+O4IIjdJ2pdvrcNtNmGQWL/WDEtcZuNciJW9mn2aRARp8L0aJM1jvH
 +7NVX3jgZKlls1T1aqvoaXL/5ObR7HSsw139dnvmgnLkcJNCnqOuw0LlqxjEO5Vd
 Njp5XVJ2uQb3pwjxOV1TQmYyORJB8r4pUYLXpk4GVL3wrvX6VKAzV/OOVBEWS2tP
 H/jTYxtRJ+5oZDwndJfxl6dco7vAAIxzvw+kppbsddifyDdfRr6BVm3+3hO6xBg3
 15+Hhq91/5ylqetcjLVZdFaiNv63RPp6ymcH3JWA5zrlSdKXsjnLBS0Iw5FmQLsM
 Qbhh88nHgaISKBqgkUHtDhkgc5saig7Fhzn7Y5nXVrIsYNczcyiX9LxvkLXk4RDJ
 QbmtTmdQOr8AKjV3YcdbQJrHP7zIfGsBDkhEYwYEylWi9PMZI9UV4ZpgAl0wPMkP
 5foEpyUyWp/7kivBwv4oHgURpscrT+Go6Jofa3jJ2F7QCrCwhWQfjvF/n5lvuVxU
 iAMYQjQnUjUQYJ/CKOoZJOcYnqqUVqX3sWt2/cLfRbRSIc9AbA0=
 =1q5b
 -----END PGP SIGNATURE-----

Sync with 2.25.1
2020-02-16 20:41:40 -08:00
Junio C Hamano c522f061d5 Git 2.25.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-16 20:37:38 -08:00
Elijah Newren 10cdb9f38a rebase: rename the two primary rebase backends
Two related changes, with separate rationale for each:

Rename the 'interactive' backend to 'merge' because:
  * 'interactive' as a name caused confusion; this backend has been used
    for many kinds of non-interactive rebases, and will probably be used
    in the future for more non-interactive rebases than interactive ones
    given that we are making it the default.
  * 'interactive' is not the underlying strategy; merging is.
  * the directory where state is stored is not called
    .git/rebase-interactive but .git/rebase-merge.

Rename the 'am' backend to 'apply' because:
  * Few users are familiar with git-am as a reference point.
  * Related to the above, the name 'am' makes sentences in the
    documentation harder for users to read and comprehend (they may read
    it as the verb from "I am"); avoiding this difficult places a large
    burden on anyone writing documentation about this backend to be very
    careful with quoting and sentence structure and often forces
    annoying redundancy to try to avoid such problems.
  * Users stumble over pronunciation ("am" as in "I am a person not a
    backend" or "am" as in "the first and thirteenth letters in the
    alphabet in order are "A-M"); this may drive confusion when one user
    tries to explain to another what they are doing.
  * While "am" is the tool driving this backend, the tool driving git-am
    is git-apply, and since we are driving towards lower-level tools
    for the naming of the merge backend we may as well do so here too.
  * The directory where state is stored has never been called
    .git/rebase-am, it was always called .git/rebase-apply.

For all the reasons listed above:
  * Modify the documentation to refer to the backends with the new names
  * Provide a brief note in the documentation connecting the new names
    to the old names in case users run across the old names anywhere
    (e.g. in old release notes or older versions of the documentation)
  * Change the (new) --am command line flag to --apply
  * Rename some enums, variables, and functions to reinforce the new
    backend names for us as well.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-16 15:40:42 -08:00
Elijah Newren 2ac0d6273f rebase: change the default backend from "am" to "merge"
The am-backend drops information and thus limits what we can do:

  * lack of full tree information from the original commits means we
    cannot do directory rename detection and warn users that they might
    want to move some of their new files that they placed in old
    directories to prevent their becoming orphaned.[1]
  * reduction in context from only having a few lines beyond those
    changed means that when context lines are non-unique we can apply
    patches incorrectly.[2]
  * lack of access to original commits means that conflict marker
    annotation has less information available.
  * the am backend has safety problems with an ill-timed interrupt.

Also, the merge/interactive backend have far more abilities, appear to
currently have a slight performance advantage[3] and have room for more
optimizations than the am backend[4] (and work is underway to take
advantage of some of those possibilities).

[1] https://lore.kernel.org/git/xmqqh8jeh1id.fsf@gitster-ct.c.googlers.com/
[2] https://lore.kernel.org/git/CABPp-BGiu2nVMQY_t-rnFR5GQUz_ipyEE8oDocKeO+h+t4Mn4A@mail.gmail.com/
[3] https://public-inbox.org/git/CABPp-BF=ev03WgODk6TMQmuNoatg2kiEe5DR__gJ0OTVqHSnfQ@mail.gmail.com/
[4] https://lore.kernel.org/git/CABPp-BGh7yW69QwxQb13K0HM38NKmQif3A6C6UULEKYnkEJ5vA@mail.gmail.com/

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-16 15:40:42 -08:00