]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agocommit-graph write: emit a percentage for all progress
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:21 +0000 (21:21 +0100)] 
commit-graph write: emit a percentage for all progress

Follow-up 01ca387774 ("commit-graph: split up close_reachable()
progress output", 2018-11-19) by making the progress bars in
close_reachable() report a completion percentage. This fixes the last
occurrence where in the commit graph writing where we didn't report
that.

The change in 01ca387774 split up the 1x progress bar in
close_reachable() into 3x, but left them as dumb counters without a
percentage completion. Fixing that is easy, and the only reason it
wasn't done already is because that commit was rushed in during the
v2.20.0 RC period to fix the unrelated issue of over-reporting commit
numbers. See [1] and follow-ups for ML activity at the time and [2]
for an alternative approach where the progress bars weren't split up.

Now for e.g. linux.git we'll emit:

    $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
    Finding commits for commit graph among packed objects: 100% (6529159/6529159), done.
    Expanding reachable commits in commit graph: 100% (815990/815980), done.
    Computing commit graph generation numbers: 100% (815983/815983), done.
    Writing out commit graph in 4 passes: 100% (3263932/3263932), done.

1. https://public-inbox.org/git/20181119202300.18670-1-avarab@gmail.com/
2. https://public-inbox.org/git/20181122153922.16912-11-avarab@gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: add itermediate progress
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:20 +0000 (21:21 +0100)] 
commit-graph write: add itermediate progress

Add progress output to sections of code between "Annotating[...]" and
"Computing[...]generation numbers". This can collectively take 5-10
seconds on a large enough repository.

On a test repository with I have with ~7 million commits and ~50
million objects we'll now emit:

    $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
    Finding commits for commit graph among packed objects: 100% (124763727/124763727), done.
    Loading known commits in commit graph: 100% (18989461/18989461), done.
    Expanding reachable commits in commit graph: 100% (18989507/18989461), done.
    Clearing commit marks in commit graph: 100% (18989507/18989507), done.
    Counting distinct commits in commit graph: 100% (18989507/18989507), done.
    Finding extra edges in commit graph: 100% (18989507/18989507), done.
    Computing commit graph generation numbers: 100% (7250302/7250302), done.
    Writing out commit graph in 4 passes: 100% (29001208/29001208), done.

Whereas on a medium-sized repository such as linux.git these new
progress bars won't have time to kick in and as before and we'll still
emit output like:

    $ ~/g/git/git --exec-path=$HOME/g/git commit-graph write
    Finding commits for commit graph among packed objects: 100% (6529159/6529159), done.
    Expanding reachable commits in commit graph: 815990, done.
    Computing commit graph generation numbers: 100% (815983/815983), done.
    Writing out commit graph in 4 passes: 100% (3263932/3263932), done.

The "Counting distinct commits in commit graph" phase will spend most
of its time paused at "0/*" as we QSORT(...) the list. That's not
optimal, but at least we don't seem to be stalling anymore most of the
time.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: remove empty line for readability
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:19 +0000 (21:21 +0100)] 
commit-graph write: remove empty line for readability

Remove the empty line between a QSORT(...) and the subsequent oideq()
for-loop. This makes it clearer that the QSORT(...) is being done so
that we can run the oideq() loop on adjacent OIDs. Amends code added
in 08fd81c9b6 ("commit-graph: implement write_commit_graph()",
2018-04-02).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: add more descriptive progress output
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:18 +0000 (21:21 +0100)] 
commit-graph write: add more descriptive progress output

Make the progress output shown when we're searching for commits to
include in the graph more descriptive. This amends code I added in
7b0f229222 ("commit-graph write: add progress output", 2018-09-17).

Now, on linux.git, we'll emit this sort of output in the various modes
we support:

    $ git commit-graph write
    Finding commits for commit graph among packed objects: 100% (6529159/6529159), done.
    [...]

    # Actually we don't emit this since this takes almost no time at
    # all. But if we did (s/_delayed//) we'd show:
    $ git for-each-ref --format='%(objectname)' | git commit-graph write --stdin-commits
    Finding commits for commit graph from 630 refs: 100% (630/630), done.
    [...]

    $ (cd .git/objects/pack/ && ls *idx) | git commit-graph write --stdin-pack
    Finding commits for commit graph in 3 packs: 6529159, done.
    [...]

The middle on of those is going to be the output users might see in
practice, since it'll be emitted when they get the commit graph via
gc.writeCommitGraph=true. But as noted above you need a really large
number of refs for this message to show. It'll show up on a test
repository I have with ~165k refs:

    Finding commits for commit graph from 165203 refs: 100% (165203/165203), done.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: show progress for object search
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:17 +0000 (21:21 +0100)] 
commit-graph write: show progress for object search

Show the percentage progress for the "Finding commits for commit
graph" phase for the common case where we're operating on all packs in
the repository, as "commit-graph write" or "gc" will do.

Before we'd emit on e.g. linux.git with "commit-graph write":

    Finding commits for commit graph: 6529159, done.
    [...]

And now:

    Finding commits for commit graph: 100% (6529159/6529159), done.
    [...]

Since the commit graph only includes those commits that are packed
(via for_each_packed_object(...)) the approximate_object_count()
returns the actual number of objects we're going to process.

Still, it is possible due to a race with "gc" or another process
maintaining packs that the number of objects we're going to process is
lower than what approximate_object_count() reported. In that case we
don't want to stop the progress bar short of 100%. So let's make sure
it snaps to 100% at the end.

The inverse case is also possible and more likely. I.e. that a new
pack has been added between approximate_object_count() and
for_each_packed_object(). In that case the percentage will go beyond
100%, and we'll do nothing to snap it back to 100% at the end.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: more descriptive "writing out" output
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:16 +0000 (21:21 +0100)] 
commit-graph write: more descriptive "writing out" output

Make the "Writing out" part of the progress output more
descriptive. Depending on the shape of the graph we either make 3 or 4
passes over it.

Let's present this information to the user in case they're wondering
what this number, which is much larger than their number of commits,
has to do with writing out the commit graph. Now e.g. on linux.git we
emit:

    $ ~/g/git/git --exec-path=$HOME/g/git -C ~/g/linux commit-graph write
    Finding commits for commit graph: 6529159, done.
    Expanding reachable commits in commit graph: 815990, done.
    Computing commit graph generation numbers: 100% (815983/815983), done.
    Writing out commit graph in 4 passes: 100% (3263932/3263932), done.

A note on i18n: Why are we using the Q_() function and passing a
number & English text for a singular which'll never be used? Because
the plural rules of translated languages may not match those of
English, and to use the plural function we need to use this format.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: add "Writing out" progress output
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:15 +0000 (21:21 +0100)] 
commit-graph write: add "Writing out" progress output

Add progress output to be shown when we're writing out the
commit-graph, this adds to the output already added in 7b0f229222
("commit-graph write: add progress output", 2018-09-17).

As noted in that commit most of the progress output isn't displayed on
small repositories, but before this change we'd noticeably hang for
2-3 seconds at the end on medium sized repositories such as linux.git.

Now we'll instead show output like this, and reduce the
human-observable times at which we're not producing progress output:

    $ ~/g/git/git --exec-path=$HOME/g/git -C ~/g/2015-04-03-1M-git commit-graph write
    Finding commits for commit graph: 13064614, done.
    Expanding reachable commits in commit graph: 1000447, done.
    Computing commit graph generation numbers: 100% (1000447/1000447), done.
    Writing out commit graph: 100% (3001341/3001341), done.

This "Writing out" number is 3x or 4x the number of commits, depending
on the graph we're processing. A later change will make this explicit
to the user.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: don't call write_graph_chunk_extra_edges() unnecessarily
SZEDER Gábor [Wed, 23 Jan 2019 17:51:22 +0000 (18:51 +0100)] 
commit-graph: don't call write_graph_chunk_extra_edges() unnecessarily

The optional 'Extra Edge List' chunk of the commit graph file stores
parent information for commits with more than two parents.  Since the
chunk is optional, write_commit_graph() looks through all commits to
find those with more than two parents, and then writes the commit
graph file header accordingly, i.e. if there are no such commits, then
there won't be a 'Extra Edge List' chunk written, only the three
mandatory chunks.

However, when it later comes to writing actual chunk data,
write_commit_graph() unconditionally invokes
write_graph_chunk_extra_edges(), even when it was decided earlier that
that chunk won't be written.  Strictly speaking there is no bug here,
because write_graph_chunk_extra_edges() won't write anything if it
doesn't find any commits with more than two parents, but then it
unnecessarily and in vain looks through all commits once again in
search for such commits.

Don't call write_graph_chunk_extra_edges() when that chunk won't be
written to spare an unnecessary iteration over all commits.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: rename "large edges" to "extra edges"
SZEDER Gábor [Sat, 19 Jan 2019 20:21:13 +0000 (21:21 +0100)] 
commit-graph: rename "large edges" to "extra edges"

The optional 'Large Edge List' chunk of the commit graph file stores
parent information for commits with more than two parents, and the
names of most of the macros, variables, struct fields, and functions
related to this chunk contain the term "large edges", e.g.
write_graph_chunk_large_edges().  However, it's not a really great
term, as the edges to the second and subsequent parents stored in this
chunk are not any larger than the edges to the first and second
parents stored in the "main" 'Commit Data' chunk.  It's the number of
edges, IOW number of parents, that is larger compared to non-merge and
"regular" two-parent merge commits.  And indeed, two functions in
'commit-graph.c' have a local variable called 'num_extra_edges' that
refer to the same thing, and this "extra edges" term is much better at
describing these edges.

So let's rename all these references to "large edges" in macro,
variable, function, etc. names to "extra edges".  There is a
GRAPH_OCTOPUS_EDGES_NEEDED macro as well; for the sake of consistency
rename it to GRAPH_EXTRA_EDGES_NEEDED.

We can do so safely without causing any incompatibility issues,
because the term "large edges" doesn't come up in the file format
itself in any form (the chunk's magic is {'E', 'D', 'G', 'E'}, there
is no 'L' in there), but only in the specification text.  The string
"large edges", however, does come up in the output of 'git
commit-graph read' and in tests looking at its input, but that command
is explicitly documented as debugging aid, so we can change its output
and the affected tests safely.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph write: use pack order when finding commits
Ævar Arnfjörð Bjarmason [Sat, 19 Jan 2019 20:21:12 +0000 (21:21 +0100)] 
commit-graph write: use pack order when finding commits

Slightly optimize the "commit-graph write" step by using
FOR_EACH_OBJECT_PACK_ORDER with for_each_object_in_pack(). See commit
[1] and [2] for the facility and a similar optimization for "cat-file".

On Linux it is around 5% slower to run:

    echo 1 >/proc/sys/vm/drop_caches &&
    cat .git/objects/pack/* >/dev/null &&
    git cat-file --batch-all-objects --batch-check --unordered

Than the same thing with the "cat" omitted. This is as expected, since
we're iterating in pack order and the "cat" is extra work.

Before this change the opposite was true of "commit-graph write". We
were 6% faster if we first ran "cat" to efficiently populate the FS
cache for our sole big pack on linux.git, than if we had populated it
via for_each_object_in_pack(). Now we're 3% faster without the "cat"
instead.

My tests were done on an unloaded Linux 3.10 system with 10 runs for
each. Derrick Stolee did his own tests on Windows[3] showing a 2%
improvement with a high degree of accuracy.

1. 736eb88fdc ("for_each_packed_object: support iterating in
   pack-order", 2018-08-10)

2. 0750bb5b51 ("cat-file: support "unordered" output for
   --batch-all-objects", 2018-08-10)

3. https://public-inbox.org/git/f71fa868-25e8-a9c9-46a6-611b987f1a8f@gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSecond batch after 2.20
Junio C Hamano [Mon, 14 Jan 2019 23:33:36 +0000 (15:33 -0800)] 
Second batch after 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'do/gitweb-strict-export-conf-doc'
Junio C Hamano [Mon, 14 Jan 2019 23:29:33 +0000 (15:29 -0800)] 
Merge branch 'do/gitweb-strict-export-conf-doc'

Doc update.

* do/gitweb-strict-export-conf-doc:
  docs: fix $strict_export text in gitweb.conf.txt

5 years agoMerge branch 'nd/indentation-fix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:32 +0000 (15:29 -0800)] 
Merge branch 'nd/indentation-fix'

Code cleanup.

* nd/indentation-fix:
  Indent code with TABs

5 years agoMerge branch 'en/directory-renames-nothanks-doc-update'
Junio C Hamano [Mon, 14 Jan 2019 23:29:32 +0000 (15:29 -0800)] 
Merge branch 'en/directory-renames-nothanks-doc-update'

Doc update.

* en/directory-renames-nothanks-doc-update:
  git-rebase.txt: update note about directory rename detection and am

5 years agoMerge branch 'bw/mailmap'
Junio C Hamano [Mon, 14 Jan 2019 23:29:32 +0000 (15:29 -0800)] 
Merge branch 'bw/mailmap'

* bw/mailmap:
  mailmap: update brandon williams's email address

5 years agoMerge branch 'fd/gitweb-snapshot-conf-doc-fix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:32 +0000 (15:29 -0800)] 
Merge branch 'fd/gitweb-snapshot-conf-doc-fix'

Doc update.

* fd/gitweb-snapshot-conf-doc-fix:
  docs/gitweb.conf: config variable typo

5 years agoMerge branch 'tb/use-common-win32-pathfuncs-on-cygwin'
Junio C Hamano [Mon, 14 Jan 2019 23:29:32 +0000 (15:29 -0800)] 
Merge branch 'tb/use-common-win32-pathfuncs-on-cygwin'

Cygwin update.

* tb/use-common-win32-pathfuncs-on-cygwin:
  git clone <url> C:\cygwin\home\USER\repo' is working (again)

5 years agoMerge branch 'km/rebase-doc-typofix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:32 +0000 (15:29 -0800)] 
Merge branch 'km/rebase-doc-typofix'

Doc update.

* km/rebase-doc-typofix:
  rebase docs: drop stray word in merge command description

5 years agoMerge branch 'md/exclude-promisor-objects-fix-cleanup'
Junio C Hamano [Mon, 14 Jan 2019 23:29:31 +0000 (15:29 -0800)] 
Merge branch 'md/exclude-promisor-objects-fix-cleanup'

Code clean-up.

* md/exclude-promisor-objects-fix-cleanup:
  revision.c: put promisor option in specialized struct

5 years agoMerge branch 'tb/log-G-binary'
Junio C Hamano [Mon, 14 Jan 2019 23:29:31 +0000 (15:29 -0800)] 
Merge branch 'tb/log-G-binary'

"git log -G<regex>" looked for a hunk in the "git log -p" patch
output that contained a string that matches the given pattern.
Optimize this code to ignore binary files, which by default will
not show any hunk that would match any pattern (unless textconv or
the --text option is in effect, that is).

* tb/log-G-binary:
  log -G: ignore binary files

5 years agoMerge branch 'sb/diff-color-moved-config-option-fixup'
Junio C Hamano [Mon, 14 Jan 2019 23:29:31 +0000 (15:29 -0800)] 
Merge branch 'sb/diff-color-moved-config-option-fixup'

Minor inconsistency fix.

* sb/diff-color-moved-config-option-fixup:
  diff: align move detection error handling with other options

5 years agoMerge branch 'hn/highlight-sideband-keywords'
Junio C Hamano [Mon, 14 Jan 2019 23:29:30 +0000 (15:29 -0800)] 
Merge branch 'hn/highlight-sideband-keywords'

Lines that begin with a certain keyword that come over the wire, as
well as lines that consist only of one of these keywords, ought to
be painted in color for easier eyeballing, but the latter was
broken ever since the feature was introduced in 2.19, which has
been corrected.

* hn/highlight-sideband-keywords:
  sideband: color lines with keyword only

5 years agoMerge branch 'cb/test-lint-cp-a'
Junio C Hamano [Mon, 14 Jan 2019 23:29:30 +0000 (15:29 -0800)] 
Merge branch 'cb/test-lint-cp-a'

BSD port update.

* cb/test-lint-cp-a:
  tests: add lint for non portable cp -a

5 years agoMerge branch 'cb/t5004-empty-tar-archive-fix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:30 +0000 (15:29 -0800)] 
Merge branch 'cb/t5004-empty-tar-archive-fix'

BSD port update.

* cb/t5004-empty-tar-archive-fix:
  t5004: avoid using tar for empty packages

5 years agoMerge branch 'cb/openbsd-allows-reading-directory'
Junio C Hamano [Mon, 14 Jan 2019 23:29:30 +0000 (15:29 -0800)] 
Merge branch 'cb/openbsd-allows-reading-directory'

BSD port update.

* cb/openbsd-allows-reading-directory:
  config.mak.uname: OpenBSD uses BSD semantics with fread for directories

5 years agoMerge branch 'hb/t0061-dot-in-path-fix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:29 +0000 (15:29 -0800)] 
Merge branch 'hb/t0061-dot-in-path-fix'

Test update.

* hb/t0061-dot-in-path-fix:
  t0061: do not fail test if '.' is part of $PATH

5 years agoMerge branch 'nd/checkout-noisy'
Junio C Hamano [Mon, 14 Jan 2019 23:29:28 +0000 (15:29 -0800)] 
Merge branch 'nd/checkout-noisy'

"git checkout [<tree-ish>] path..." learned to report the number of
paths that have been checked out of the index or the tree-ish,
which gives it the same degree of noisy-ness as the case in which
the command checks out a branch.

* nd/checkout-noisy:
  t0027: squelch checkout path run outside test_expect_* block
  checkout: print something when checking out paths

5 years agoMerge branch 'ab/commit-graph-progress-fix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:28 +0000 (15:29 -0800)] 
Merge branch 'ab/commit-graph-progress-fix'

* ab/commit-graph-progress-fix:
  commit-graph: split up close_reachable() progress output

5 years agoMerge branch 'nd/attr-pathspec-in-tree-walk'
Junio C Hamano [Mon, 14 Jan 2019 23:29:28 +0000 (15:29 -0800)] 
Merge branch 'nd/attr-pathspec-in-tree-walk'

The traversal over tree objects has learned to honor
":(attr:label)" pathspec match, which has been implemented only for
enumerating paths on the filesystem.

* nd/attr-pathspec-in-tree-walk:
  tree-walk: support :(attr) matching
  dir.c: move, rename and export match_attrs()
  pathspec.h: clean up "extern" in function declarations
  tree-walk.c: make tree_entry_interesting() take an index
  tree.c: make read_tree*() take 'struct repository *'

5 years agoMerge branch 'md/list-lazy-objects-fix'
Junio C Hamano [Mon, 14 Jan 2019 23:29:28 +0000 (15:29 -0800)] 
Merge branch 'md/list-lazy-objects-fix'

"git rev-list --exclude-promisor-objects" had to take an object
that does not exist locally (and is lazily available) from the
command line without barfing, but the code dereferenced NULL.

* md/list-lazy-objects-fix:
  list-objects.c: don't segfault for missing cmdline objects

5 years agoFirst batch after 2.20.1
Junio C Hamano [Fri, 4 Jan 2019 21:39:39 +0000 (13:39 -0800)] 
First batch after 2.20.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'mk/http-backend-kill-children-before-exit'
Junio C Hamano [Fri, 4 Jan 2019 21:33:34 +0000 (13:33 -0800)] 
Merge branch 'mk/http-backend-kill-children-before-exit'

The http-backend CGI process did not correctly clean up the child
processes it spawns to run upload-pack etc. when it dies itself,
which has been corrected.

* mk/http-backend-kill-children-before-exit:
  http-backend: enable cleaning up forked upload/receive-pack on exit

5 years agoMerge branch 'sd/stash-wo-user-name'
Junio C Hamano [Fri, 4 Jan 2019 21:33:34 +0000 (13:33 -0800)] 
Merge branch 'sd/stash-wo-user-name'

A properly configured username/email is required under
user.useConfigOnly in order to create commits; now "git stash"
(even though it creates commit objects to represent stash entries)
command is exempt from the requirement.

* sd/stash-wo-user-name:
  stash: tolerate missing user identity

5 years agoMerge branch 'sg/clone-initial-fetch-configuration'
Junio C Hamano [Fri, 4 Jan 2019 21:33:34 +0000 (13:33 -0800)] 
Merge branch 'sg/clone-initial-fetch-configuration'

Refspecs configured with "git -c var=val clone" did not propagate
to the resulting repository, which has been corrected.

* sg/clone-initial-fetch-configuration:
  Documentation/clone: document ignored configuration variables
  clone: respect additional configured fetch refspecs during initial fetch
  clone: use a more appropriate variable name for the default refspec

5 years agoMerge branch 'nd/checkout-dwim-fix'
Junio C Hamano [Fri, 4 Jan 2019 21:33:34 +0000 (13:33 -0800)] 
Merge branch 'nd/checkout-dwim-fix'

"git checkout frotz" (without any double-dash) avoids ambiguity by
making sure 'frotz' cannot be interpreted as a revision and as a
path at the same time.  This safety has been updated to check also
a unique remote-tracking branch 'frotz' in a remote, when dwimming
to create a local branch 'frotz' out of a remote-tracking branch
'frotz' from a remote.

* nd/checkout-dwim-fix:
  checkout: disambiguate dwim tracking branches and local files

5 years agoMerge branch 'ab/push-dwim-dst'
Junio C Hamano [Fri, 4 Jan 2019 21:33:33 +0000 (13:33 -0800)] 
Merge branch 'ab/push-dwim-dst'

"git push $there $src:$dst" rejects when $dst is not a fully
qualified refname and not clear what the end user meant.  The
codepath has been taught to give a clearer error message, and also
guess where the push should go by taking the type of the pushed
object into account (e.g. a tag object would want to go under
refs/tags/).

* ab/push-dwim-dst:
  push doc: document the DWYM behavior pushing to unqualified <dst>
  push: test that <src> doesn't DWYM if <dst> is unqualified
  push: add an advice on unqualified <dst> push
  push: move unqualified refname error into a function
  push: improve the error shown on unqualified <dst> push
  i18n: remote.c: mark error(...) messages for translation
  remote.c: add braces in anticipation of a follow-up change

5 years agoMerge branch 'en/fast-export-import'
Junio C Hamano [Fri, 4 Jan 2019 21:33:33 +0000 (13:33 -0800)] 
Merge branch 'en/fast-export-import'

Small fixes and features for fast-export and fast-import, mostly on
the fast-export side.

* en/fast-export-import:
  fast-export: add a --show-original-ids option to show original names
  fast-import: remove unmaintained duplicate documentation
  fast-export: add --reference-excluded-parents option
  fast-export: ensure we export requested refs
  fast-export: when using paths, avoid corrupt stream with non-existent mark
  fast-export: move commit rewriting logic into a function for reuse
  fast-export: avoid dying when filtering by paths and old tags exist
  fast-export: use value from correct enum
  git-fast-export.txt: clarify misleading documentation about rev-list args
  git-fast-import.txt: fix documentation for --quiet option
  fast-export: convert sha1 to oid

5 years agoMerge branch 'nd/the-index'
Junio C Hamano [Fri, 4 Jan 2019 21:33:33 +0000 (13:33 -0800)] 
Merge branch 'nd/the-index'

More codepaths become aware of working with in-core repository
instance other than the default "the_repository".

* nd/the-index: (22 commits)
  rebase-interactive.c: remove the_repository references
  rerere.c: remove the_repository references
  pack-*.c: remove the_repository references
  pack-check.c: remove the_repository references
  notes-cache.c: remove the_repository references
  line-log.c: remove the_repository reference
  diff-lib.c: remove the_repository references
  delta-islands.c: remove the_repository references
  cache-tree.c: remove the_repository references
  bundle.c: remove the_repository references
  branch.c: remove the_repository reference
  bisect.c: remove the_repository reference
  blame.c: remove implicit dependency the_repository
  sequencer.c: remove implicit dependency on the_repository
  sequencer.c: remove implicit dependency on the_index
  transport.c: remove implicit dependency on the_index
  notes-merge.c: remove implicit dependency the_repository
  notes-merge.c: remove implicit dependency on the_index
  list-objects.c: reduce the_repository references
  list-objects-filter.c: remove implicit dependency on the_index
  ...

5 years agoMerge branch 'jk/loose-object-cache'
Junio C Hamano [Fri, 4 Jan 2019 21:33:32 +0000 (13:33 -0800)] 
Merge branch 'jk/loose-object-cache'

Code clean-up with optimization for the codepath that checks
(non-)existence of loose objects.

* jk/loose-object-cache:
  odb_load_loose_cache: fix strbuf leak
  fetch-pack: drop custom loose object cache
  sha1-file: use loose object cache for quick existence check
  object-store: provide helpers for loose_objects_cache
  sha1-file: use an object_directory for the main object dir
  handle alternates paths the same as the main object dir
  sha1_file_name(): overwrite buffer instead of appending
  rename "alternate_object_database" to "object_directory"
  submodule--helper: prefer strip_suffix() to ends_with()
  fsck: do not reuse child_process structs

5 years agoMerge branch 'fc/http-version'
Junio C Hamano [Fri, 4 Jan 2019 21:33:32 +0000 (13:33 -0800)] 
Merge branch 'fc/http-version'

The "http.version" configuration variable can be used with recent
enough cURL library to force the version of HTTP used to talk when
fetching and pushing.

* fc/http-version:
  http: add support selecting http version

5 years agoMerge branch 'en/merge-path-collision'
Junio C Hamano [Fri, 4 Jan 2019 21:33:32 +0000 (13:33 -0800)] 
Merge branch 'en/merge-path-collision'

Updates for corner cases in merge-recursive.

* en/merge-path-collision:
  t6036: avoid non-portable "cp -a"
  merge-recursive: combine error handling
  t6036, t6043: increase code coverage for file collision handling
  merge-recursive: improve rename/rename(1to2)/add[/add] handling
  merge-recursive: use handle_file_collision for add/add conflicts
  merge-recursive: improve handling for rename/rename(2to1) conflicts
  merge-recursive: fix rename/add conflict handling
  merge-recursive: new function for better colliding conflict resolutions
  merge-recursive: increase marker length with depth of recursion
  t6036, t6042: testcases for rename collision of already conflicting files
  t6042: add tests for consistency in file collision conflict handling

5 years agoMerge branch 'nd/i18n'
Junio C Hamano [Fri, 4 Jan 2019 21:33:31 +0000 (13:33 -0800)] 
Merge branch 'nd/i18n'

More _("i18n") markings.

* nd/i18n:
  fsck: mark strings for translation
  fsck: reduce word legos to help i18n
  parse-options.c: mark more strings for translation
  parse-options.c: turn some die() to BUG()
  parse-options: replace opterror() with optname()
  repack: mark more strings for translation
  remote.c: mark messages for translation
  remote.c: turn some error() or die() to BUG()
  reflog: mark strings for translation
  read-cache.c: add missing colon separators
  read-cache.c: mark more strings for translation
  read-cache.c: turn die("internal error") to BUG()
  attr.c: mark more string for translation
  archive.c: mark more strings for translation
  alias.c: mark split_cmdline_strerror() strings for translation
  git.c: mark more strings for translation

5 years agogit clone <url> C:\cygwin\home\USER\repo' is working (again)
Torsten Bögershausen [Sat, 15 Dec 2018 04:33:30 +0000 (05:33 +0100)] 
git clone <url> C:\cygwin\home\USER\repo' is working (again)

A regression for cygwin users was introduced with commit 05b458c,
 "real_path: resolve symlinks by hand".

In the the commit message we read:
  The current implementation of real_path uses chdir() in order to resolve
    symlinks.  Unfortunately this isn't thread-safe as chdir() affects a
      process as a whole...

The old (and non-thread-save) OS calls chdir()/pwd() had been
replaced by a string operation.
The cygwin layer "knows" that "C:\cygwin" is an absolute path,
but the new string operation does not.

"git clone <url> C:\cygwin\home\USER\repo" fails like this:
fatal: Invalid path '/home/USER/repo/C:\cygwin\home\USER\repo'

The solution is to implement has_dos_drive_prefix(), skip_dos_drive_prefix()
is_dir_sep(), offset_1st_component() and convert_slashes() for cygwin
in the same way as it is done in 'Git for Windows' in compat/mingw.[ch]

Extract the needed code into compat/win32/path-utils.[ch] and use it
for cygwin as well.

Reported-by: Steven Penny <svnpenn@gmail.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agolog -G: ignore binary files
Thomas Braun [Fri, 14 Dec 2018 18:49:12 +0000 (19:49 +0100)] 
log -G: ignore binary files

The -G<regex> option of log looks for the differences whose patch text
contains added/removed lines that match regex.

Currently -G looks also into patches of binary files (which
according to [1]) is binary as well.

This has a couple of issues:

- It makes the pickaxe search slow. In a proprietary repository of the
  author with only ~5500 commits and a total .git size of ~300MB
  searching takes ~13 seconds

    $time git log -Gwave > /dev/null

    real    0m13,241s
    user    0m12,596s
    sys     0m0,644s

  whereas when we ignore binary files with this patch it takes ~4s

    $time ~/devel/git/git log -Gwave > /dev/null

    real    0m3,713s
    user    0m3,608s
    sys     0m0,105s

  which is a speedup of more than fourfold.

- The internally used algorithm for generating patch text is based on
  xdiff and its states in [1]

  > The output format of the binary patch file is proprietary
  > (and binary) and it is basically a collection of copy and insert
  > commands [..]

  which means that the current format could change once the internal
  algorithm is changed as the format is not standardized. In addition
  the git binary patch format used for preparing patches for git apply
  is *different* from the xdiff format as can be seen by comparing

  git log -p -a

    commit 6e95bf4bafccf14650d02ab57f3affe669be10cf
    Author: A U Thor <author@example.com>
    Date:   Thu Apr 7 15:14:13 2005 -0700

        modify binary file

    diff --git a/data.bin b/data.bin
    index f414c84..edfeb6f 100644
    --- a/data.bin
    +++ b/data.bin
    @@ -1,2 +1,4 @@
     a
     a^@a
    +a
    +a^@a

  with git log --binary

    commit 6e95bf4bafccf14650d02ab57f3affe669be10cf
    Author: A U Thor <author@example.com>
    Date:   Thu Apr 7 15:14:13 2005 -0700

        modify binary file

    diff --git a/data.bin b/data.bin
    index f414c84bd3aa25fa07836bb1fb73db784635e24b..edfeb6f501[..]
    GIT binary patch
    literal 12
    QcmYe~N@Pgn0zx1O01)N^ZvX%Q

    literal 6
    NcmYe~N@Pgn0ssWg0XP5v

  which seems unexpected.

To resolve these issues this patch makes -G<regex> ignore binary files
by default. Textconv filters are supported and also -a/--text for
getting the old and broken behaviour back.

The -S<block of text> option of log looks for differences that changes
the number of occurrences of the specified block of text (i.e.
addition/deletion) in a file. As we want to keep the current behaviour,
add a test to ensure it stays that way.

[1]: http://www.xmailserver.org/xdiff.html

Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with Git 2.20.1
Junio C Hamano [Sat, 15 Dec 2018 04:00:25 +0000 (13:00 +0900)] 
Sync with Git 2.20.1

* maint:
  Git 2.20.1
  .gitattributes: ensure t/oid-info/* has eol=lf
  t9902: 'send-email' test case requires PERL
  t4256: mark support files as LF-only
  parse-options: fix SunCC compiler warning
  help -a: handle aliases with long names gracefully
  help.h: fix coding style
  run-command: report exec failure

5 years agoPrepare for 2.21 cycle to start soonish
Junio C Hamano [Sat, 15 Dec 2018 03:36:06 +0000 (12:36 +0900)] 
Prepare for 2.21 cycle to start soonish

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.20.1 v2.20.1
Junio C Hamano [Sat, 15 Dec 2018 03:31:34 +0000 (12:31 +0900)] 
Git 2.20.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'jc/run-command-report-exec-failure-fix' into maint
Junio C Hamano [Sat, 15 Dec 2018 03:24:34 +0000 (12:24 +0900)] 
Merge branch 'jc/run-command-report-exec-failure-fix' into maint

A recent update accidentally squelched an error message when the
run_command API failed to run a missing command, which has been
corrected.

* jc/run-command-report-exec-failure-fix:
  run-command: report exec failure

5 years agoMerge branch 'js/help-commands-verbose-by-default-fix' into maint
Junio C Hamano [Sat, 15 Dec 2018 03:24:33 +0000 (12:24 +0900)] 
Merge branch 'js/help-commands-verbose-by-default-fix' into maint

"git help -a" did not work well when an overly long alias is
defined, which has been corrected.

* js/help-commands-verbose-by-default-fix:
  help -a: handle aliases with long names gracefully
  help.h: fix coding style

5 years agoMerge branch 'nd/show-gitcomp-compilation-fix' into maint
Junio C Hamano [Sat, 15 Dec 2018 03:24:33 +0000 (12:24 +0900)] 
Merge branch 'nd/show-gitcomp-compilation-fix' into maint

Portability fix for a recent update to parse-options API.

* nd/show-gitcomp-compilation-fix:
  parse-options: fix SunCC compiler warning

5 years agoMerge branch 'js/t9902-send-email-completion-fix' into maint
Junio C Hamano [Sat, 15 Dec 2018 03:24:32 +0000 (12:24 +0900)] 
Merge branch 'js/t9902-send-email-completion-fix' into maint

* js/t9902-send-email-completion-fix:
  t9902: 'send-email' test case requires PERL

5 years agoMerge branch 'js/mailinfo-format-flowed-fix' into maint
Junio C Hamano [Sat, 15 Dec 2018 03:24:32 +0000 (12:24 +0900)] 
Merge branch 'js/mailinfo-format-flowed-fix' into maint

Test portability fix.

* js/mailinfo-format-flowed-fix:
  t4256: mark support files as LF-only

5 years agoMerge branch 'ds/hash-independent-tests-fix' into maint
Junio C Hamano [Sat, 15 Dec 2018 03:24:32 +0000 (12:24 +0900)] 
Merge branch 'ds/hash-independent-tests-fix' into maint

Test portability fix.

* ds/hash-independent-tests-fix:
  .gitattributes: ensure t/oid-info/* has eol=lf

5 years ago.gitattributes: ensure t/oid-info/* has eol=lf
Derrick Stolee [Tue, 11 Dec 2018 20:35:46 +0000 (12:35 -0800)] 
.gitattributes: ensure t/oid-info/* has eol=lf

The new test_oid machinery in the test library requires reading
some information from t/oid-info/hash-info and t/oid-info/oid.

The logic to read from these files in shell uses built-in "read"
command, which leaves CR at the end of these text files when they
are checked out with CRLF line endings, at least when run with bash
shipped with Git for Windows.  This results in an unexpected value
in the variable these lines are read into, leading the tests to
fail.

Mark them to be checked out always with the LF line endings.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot9902: 'send-email' test case requires PERL
Johannes Schindelin [Thu, 13 Dec 2018 14:04:19 +0000 (06:04 -0800)] 
t9902: 'send-email' test case requires PERL

The oneline notwithstanding, 13374987dd (completion: use _gitcompbuiltin
for format-patch, 2018-11-03) changed also the way send-email options
are completed, by asking the git send-email command itself what options
it offers.

Necessarily, this must fail when built with NO_PERL because send-email
itself is a Perl script. Which means that we need the PERL prerequisite
for the send-email test case in t9902.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4256: mark support files as LF-only
Johannes Schindelin [Wed, 12 Dec 2018 18:14:54 +0000 (10:14 -0800)] 
t4256: mark support files as LF-only

The test t4256-am-format-flowed.sh requires carefully applying a
patch after ignoring padding whitespace. This breaks if the file
is munged to include CRLF line endings instead of LF.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoparse-options: fix SunCC compiler warning
Nguyễn Thái Ngọc Duy [Tue, 11 Dec 2018 15:35:01 +0000 (16:35 +0100)] 
parse-options: fix SunCC compiler warning

The compiler reports this because show_gitcomp() never actually
returns a value:

    "parse-options.c", line 520: warning: Function has no return
    statement : show_gitcomp

We could shut the compiler up. But instead let's not bury exit() too
deep. Do the same as internal -h handling, return a special error code
and handle the exit() in parse_options() (and other
parse_options_step() callers) instead.

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agohelp -a: handle aliases with long names gracefully
Johannes Schindelin [Tue, 11 Dec 2018 14:58:11 +0000 (06:58 -0800)] 
help -a: handle aliases with long names gracefully

We take pains to determine the longest command beforehand, so that we
can align the category column after printing the command names.

However, then we re-use that value when printing the aliases. If any
alias name is longer than the longest command name, we consequently try
to add a negative number of spaces (but `mput_char()` does not expect
any negative values and simply decrements until the value is 0, i.e.
it tries to add close to 2**31 spaces).

Let's fix this by adjusting the `longest` variable before printing the
aliases.

This fixes https://github.com/git-for-windows/git/issues/1975.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agohelp.h: fix coding style
Johannes Schindelin [Tue, 11 Dec 2018 14:58:10 +0000 (06:58 -0800)] 
help.h: fix coding style

We want a space after the `while` keyword.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorun-command: report exec failure
Junio C Hamano [Tue, 11 Dec 2018 05:46:07 +0000 (14:46 +0900)] 
run-command: report exec failure

In 321fd823 ("run-command: mark path lookup errors with ENOENT",
2018-10-24), we rewrote the logic to execute a command by looking
in the directories on $PATH; as a side effect, a request to run a
command that is not found on $PATH is noticed even before a child
process is forked to execute it.

We however stopped to report an exec failure in such a case by
mistake.  Add a logic to report the error unless silent-exec-failure
is requested, to match the original code.

Reported-by: John Passaro <john.a.passaro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorebase docs: drop stray word in merge command description
Kyle Meyer [Sat, 8 Dec 2018 23:15:41 +0000 (18:15 -0500)] 
rebase docs: drop stray word in merge command description

Delete a misplaced word introduced by caafecfcf1 (rebase
--rebase-merges: adjust man page for octopus support, 2018-03-09).

Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.20 v2.20.0
Junio C Hamano [Sun, 9 Dec 2018 04:16:21 +0000 (13:16 +0900)] 
Git 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-po
Junio C Hamano [Sun, 9 Dec 2018 04:11:36 +0000 (13:11 +0900)] 
Merge tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-po

l10n-2.20.0-rnd3

* tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-po: (22 commits)
  l10n: de.po: fix two messages
  l10n: zh_CN: for git v2.20.0 l10n round 1 to 3
  l10n: update German translation
  l10n: bg.po: Updated Bulgarian translation (4187t)
  l10n: sv.po: Update Swedish translation (4187t0f0u)
  l10n: fr.po v2.20.0 round 3
  l10n: vi(4187t): Updated Vietnamese translation for v2.20.0 rd3
  l10n: es.po v2.20.0 round 3
  l10n: git.pot: v2.20.0 round 3 (5 new, 3 removed)
  l10n: vi(4185t): Updated Vietnamese translation for v2.20.0
  l10n: es.po v2.20.0 round 1
  l10n: bg.po: Updated Bulgarian translation (4185t)
  l10n: git.pot: v2.20.0 round 2 (2 new, 2 removed)
  l10n: bg.po: Updated Bulgarian translation (4185t)
  l10n: sv.po: Update Swedish translation (4185t0f0u)
  l10n: fr.po v2.20 rnd 1
  l10n: Update Catalan translation
  l10n: git.pot: v2.20.0 round 1 (254 new, 27 removed)
  l10n: Update Catalan translation
  l10n: vi.po: fix typo in pack-objects
  ...

5 years agoIndent code with TABs
Nguyễn Thái Ngọc Duy [Thu, 6 Dec 2018 15:42:06 +0000 (16:42 +0100)] 
Indent code with TABs

We indent with TABs and sometimes for fine alignment, TABs followed by
spaces, but never all spaces (unless the indentation is less than 8
columns). Indenting with spaces slips through in some places. Fix
them.

Imported code and compat/ are left alone on purpose. The former should
remain as close as upstream as possible. The latter pretty much has
separate maintainers, it's up to them to decide.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodocs: fix $strict_export text in gitweb.conf.txt
Denis Ovsienko [Thu, 6 Dec 2018 13:10:24 +0000 (13:10 +0000)] 
docs: fix $strict_export text in gitweb.conf.txt

The section discusses $gitweb_export_ok and $gitweb_list, but gitweb
Perl code does not have such variables (this likely hangs over from
GITWEB_EXPORT_OK and GITWEB_LIST respectively). Fix the section to
spell $export_ok and $projects_list like the rest of the document.

Signed-off-by: Denis Ovsienko <denis@ovsienko.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodocs/gitweb.conf: config variable typo
Frank Dana [Sat, 8 Dec 2018 00:26:09 +0000 (00:26 +0000)] 
docs/gitweb.conf: config variable typo

The documentation for the feature 'snapshot' claimed
"This feature can be configured on a per-repository basis via
repository's `gitweb.blame` configuration variable"

Fixed to specify `gitweb.snapshot` as the variable name.

Signed-off-by: Frank Dana <ferdnyc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomailmap: update brandon williams's email address
Brandon Williams [Fri, 7 Dec 2018 20:56:21 +0000 (12:56 -0800)] 
mailmap: update brandon williams's email address

Signed-off-by: Brandon Williams <bwilliams.eng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-rebase.txt: update note about directory rename detection and am
Elijah Newren [Fri, 7 Dec 2018 17:51:20 +0000 (18:51 +0100)] 
git-rebase.txt: update note about directory rename detection and am

In commit 6aba117d5cf7 ("am: avoid directory rename detection when
calling recursive merge machinery", 2018-08-29), the git-rebase manpage
probably should have also been updated to note the stronger
incompatibility between git-am and directory rename detection.  Update
it now.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: de.po: fix two messages
Ralf Thielow [Fri, 7 Dec 2018 18:43:07 +0000 (19:43 +0100)] 
l10n: de.po: fix two messages

Reported-by: Phillip Szelat <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
5 years agol10n: zh_CN: for git v2.20.0 l10n round 1 to 3
Jiang Xin [Tue, 20 Nov 2018 02:18:06 +0000 (10:18 +0800)] 
l10n: zh_CN: for git v2.20.0 l10n round 1 to 3

Translate 257 new messages (4187t0f0u) for git 2.20.0.

Reviewed-by: Zhou Fangyi <fangyi.zhou@yuriko.moe>
Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
5 years agol10n: update German translation
Ralf Thielow [Thu, 6 Dec 2018 06:44:41 +0000 (07:44 +0100)] 
l10n: update German translation

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
5 years agorevision.c: put promisor option in specialized struct
Matthew DeVore [Mon, 3 Dec 2018 22:10:19 +0000 (14:10 -0800)] 
revision.c: put promisor option in specialized struct

Put the allow_exclude_promisor_objects flag in setup_revision_opt. When
it was in rev_info, it was unclear when it was used, since rev_info is
passed to functions that don't use the flag. This resulted in
unnecessary setting of the flag in prune.c, so fix that as well.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agolist-objects.c: don't segfault for missing cmdline objects
Matthew DeVore [Wed, 5 Dec 2018 21:43:46 +0000 (13:43 -0800)] 
list-objects.c: don't segfault for missing cmdline objects

When a command is invoked with both --exclude-promisor-objects,
--objects-edge-aggressive, and a missing object on the command line,
the rev_info.cmdline array could get a NULL pointer for the value of
an 'item' field. Prevent dereferencing of a NULL pointer in that
situation.

Properly handle --ignore-missing. If it is not passed, die when an
object is missing. Otherwise, just silently ignore it.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'es/format-patch-range-diff-fix-fix'
Junio C Hamano [Tue, 4 Dec 2018 03:49:50 +0000 (12:49 +0900)] 
Merge branch 'es/format-patch-range-diff-fix-fix'

* es/format-patch-range-diff-fix-fix:
  range-diff: always pass at least minimal diff options

5 years agoMerge branch 'en/rebase-consistency'
Junio C Hamano [Tue, 4 Dec 2018 03:49:39 +0000 (12:49 +0900)] 
Merge branch 'en/rebase-consistency'

* en/rebase-consistency:
  rebase docs: fix incorrect format of the section Behavioral Differences

5 years agosideband: color lines with keyword only
Stefan Beller [Mon, 3 Dec 2018 22:37:13 +0000 (14:37 -0800)] 
sideband: color lines with keyword only

When bf1a11f0a1 (sideband: highlight keywords in remote sideband output,
2018-08-07) was introduced, it was carefully considered which strings
would be highlighted. However 59a255aef0 (sideband: do not read beyond
the end of input, 2018-08-18) brought in a regression that the original
did not test for. A line containing only the keyword and nothing else
("SUCCESS") should still be colored.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorebase docs: fix incorrect format of the section Behavioral Differences
Johannes Sixt [Mon, 3 Dec 2018 17:34:49 +0000 (18:34 +0100)] 
rebase docs: fix incorrect format of the section Behavioral Differences

The text body of section Behavioral Differences is typeset as code,
but should be regular text. Remove the indentation to achieve that.

While here, prettify the language:

- use "the x backend" instead of "x-based rebase";
- use present tense instead of future tense;

and use subsections instead of a list.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes 2.20: drop spurious double quote
Martin Ågren [Mon, 3 Dec 2018 20:21:51 +0000 (21:21 +0100)] 
RelNotes 2.20: drop spurious double quote

We have three double-quote characters, which is one too many or too few.
Dropping the last one seems to match the original intention best.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes 2.20: clarify sentence
Martin Ågren [Mon, 3 Dec 2018 20:21:50 +0000 (21:21 +0100)] 
RelNotes 2.20: clarify sentence

I had to read this sentence a few times to understand it. Let's try to
clarify it.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes 2.20: move some items between sections
Martin Ågren [Mon, 3 Dec 2018 20:21:49 +0000 (21:21 +0100)] 
RelNotes 2.20: move some items between sections

Some items that should be in "Performance, Internal Implementation,
Development Support etc." have ended up in "UI, Workflows & Features"
and "Fixes since v2.19". Move them, and do s/uses/use/ while at it.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorange-diff: always pass at least minimal diff options
Martin Ågren [Mon, 3 Dec 2018 21:21:31 +0000 (16:21 -0500)] 
range-diff: always pass at least minimal diff options

Commit d8981c3f88 ("format-patch: do not let its diff-options affect
--range-diff", 2018-11-30) taught `show_range_diff()` to accept a
NULL-pointer as an indication that it should use its own "reasonable
default". That fixed a regression from a5170794 ("Merge branch
'ab/range-diff-no-patch'", 2018-11-18), but unfortunately it introduced
a regression of its own.

In particular, it means we forget the `file` member of the diff options,
so rather than placing a range-diff in the cover-letter, we write it to
stdout. In order to fix this, rewrite the two callers adjusted by
d8981c3f88 to instead create a "dummy" set of diff options where they
only fill in the fields we absolutely require, such as output file and
color.

Modify and extend the existing tests to try and verify that the right
contents end up in the right place.

Don't revert `show_range_diff()`, i.e., let it keep accepting NULL.
Rather than removing what is dead code and figuring out it isn't
actually dead and we've broken 2.20, just leave it for now.

[es: retain diff coloring when going to stdout]

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Mon, 3 Dec 2018 04:49:45 +0000 (12:49 +0800)] 
Merge branch 'master' of git://github.com/alshopov/git-po

5 years agoconfig.mak.uname: OpenBSD uses BSD semantics with fread for directories
Carlo Marcelo Arenas Belón [Sun, 2 Dec 2018 02:43:20 +0000 (18:43 -0800)] 
config.mak.uname: OpenBSD uses BSD semantics with fread for directories

this "fixes" test 23 (proper error on directory "files") from t1308

MirBSD likely also affected but this was only tested with OpenBSD and
therefore this specific change only affects that platform

the optional 'configure' sets this automatically (tested with 6.1 to 6.4)
but considering this is a legacy feature it is likely that it affected
all old versions and is probably what most users had been using as a
workaround

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5004: avoid using tar for empty packages
Carlo Marcelo Arenas Belón [Sun, 2 Dec 2018 02:40:03 +0000 (18:40 -0800)] 
t5004: avoid using tar for empty packages

ea2d20d4c2 ("t5004: avoid using tar for checking emptiness of archive",
2013-05-09), introduced a fake empty tar archive to allow for portable
tests of emptiness without having to invoke tar

4318094047 ("archive: don't add empty directories to archives", 2017-09-13)
changed the expected result for its tests from one containing an empty
directory to a plain empty archive but the portable test wasn't updated
resulting on them failing again in (at least) NetBSD and OpenBSD

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot0061: do not fail test if '.' is part of $PATH
Junio C Hamano [Mon, 3 Dec 2018 01:05:07 +0000 (10:05 +0900)] 
t0061: do not fail test if '.' is part of $PATH

t0061 creates a script with an unlikely name in the current
directory and asks the run_command() API to run it without an
explicit path, expecting that the script does *not* get run.  This
obviously would not work if the $PATH does contain such an element.

Check if the running shell picks up the script without an explicit
path to it, and skip the test when it does, as the run_command() API
should also run the script in such an (insane) environment.

Reported-by: "H.Merijn Brand" <h.m.brand@xs4all.nl>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotests: add lint for non portable cp -a
Carlo Marcelo Arenas Belón [Sat, 1 Dec 2018 17:36:45 +0000 (09:36 -0800)] 
tests: add lint for non portable cp -a

cp -a, while a common flag isn't in POSIX and will therefore fail
on systems that don't have GNUish tools (like OpenBSD, AIX or Solaris)

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: bg.po: Updated Bulgarian translation (4187t)
Alexander Shopov [Sun, 2 Dec 2018 12:42:29 +0000 (13:42 +0100)] 
l10n: bg.po: Updated Bulgarian translation (4187t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
5 years agol10n: sv.po: Update Swedish translation (4187t0f0u)
Peter Krefting [Sun, 2 Dec 2018 14:43:34 +0000 (15:43 +0100)] 
l10n: sv.po: Update Swedish translation (4187t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
5 years agoMerge branch 'fr_2.20_round3' of git://github.com/jnavila/git
Jiang Xin [Sun, 2 Dec 2018 14:36:36 +0000 (22:36 +0800)] 
Merge branch 'fr_2.20_round3' of git://github.com/jnavila/git

5 years agol10n: fr.po v2.20.0 round 3
Jean-Noël Avila [Sun, 2 Dec 2018 10:03:23 +0000 (11:03 +0100)] 
l10n: fr.po v2.20.0 round 3

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
5 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Sun, 2 Dec 2018 09:57:24 +0000 (17:57 +0800)] 
Merge branch 'master' of https://github.com/vnwildman/git

5 years agol10n: vi(4187t): Updated Vietnamese translation for v2.20.0 rd3
Tran Ngoc Quan [Sun, 2 Dec 2018 07:15:00 +0000 (14:15 +0700)] 
l10n: vi(4187t): Updated Vietnamese translation for v2.20.0 rd3

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
5 years agol10n: es.po v2.20.0 round 3
Christopher Diaz Riveros [Sun, 2 Dec 2018 04:12:59 +0000 (23:12 -0500)] 
l10n: es.po v2.20.0 round 3

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
5 years agol10n: git.pot: v2.20.0 round 3 (5 new, 3 removed)
Jiang Xin [Sun, 2 Dec 2018 02:56:26 +0000 (10:56 +0800)] 
l10n: git.pot: v2.20.0 round 3 (5 new, 3 removed)

Generate po/git.pot from v2.20.0-rc2 for git v2.20.0 l10n round 3.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
5 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Jiang Xin [Sun, 2 Dec 2018 02:55:14 +0000 (10:55 +0800)] 
Merge branch 'master' of git://github.com/git-l10n/git-po

5 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Sun, 2 Dec 2018 02:25:09 +0000 (10:25 +0800)] 
Merge branch 'master' of https://github.com/vnwildman/git

5 years agol10n: vi(4185t): Updated Vietnamese translation for v2.20.0
Tran Ngoc Quan [Sun, 2 Dec 2018 01:56:42 +0000 (08:56 +0700)] 
l10n: vi(4185t): Updated Vietnamese translation for v2.20.0

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
5 years agol10n: es.po v2.20.0 round 1
Christopher Diaz Riveros [Sat, 1 Dec 2018 18:41:27 +0000 (13:41 -0500)] 
l10n: es.po v2.20.0 round 1

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
5 years agoGit 2.20-rc2 v2.20.0-rc2
Junio C Hamano [Sat, 1 Dec 2018 12:44:56 +0000 (21:44 +0900)] 
Git 2.20-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'gh/diff-raw-has-no-ellipses'
Junio C Hamano [Sat, 1 Dec 2018 12:41:45 +0000 (21:41 +0900)] 
Merge branch 'gh/diff-raw-has-no-ellipses'

"git diff --raw" lost ellipses to adjust the output columns for
some time now, but the documentation still showed them.

* gh/diff-raw-has-no-ellipses:
  doc: update diff-format.txt for removed ellipses in --raw