Commit graph

50098 commits

Author SHA1 Message Date
Jiang Xin 45498f08b6 Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru
* 'russian-l10n' of https://github.com/DJm00n/git-po-ru:
  l10n: ru.po: update Russian translation
2018-01-10 11:28:56 +08:00
Junio C Hamano 6366dd9000 Merge branch 'jk/doc-diff-options'
Doc update.

* jk/doc-diff-options:
  docs/diff-options: clarify scope of diff-filter types
2018-01-09 14:32:57 -08:00
Junio C Hamano 4e51984e82 Merge branch 'bw/protocol-v1'
Test fix for a topic already in 'master'.

* bw/protocol-v1:
  http: fix v1 protocol tests with apache httpd < 2.4
2018-01-09 14:32:56 -08:00
Junio C Hamano 14c84cd55b Merge branch 'sg/travis-check-untracked'
* sg/travis-check-untracked:
  travis-ci: check that all build artifacts are .gitignore-d
  travis-ci: don't store P4 and Git LFS in the working tree
2018-01-09 14:32:55 -08:00
Junio C Hamano d702d5c5bd Merge branch 'js/test-with-ws-in-path'
Test fixes.

* js/test-with-ws-in-path:
  t0302 & t3900: add forgotten quotes
  Allow the test suite to pass in a directory whose name contains spaces
2018-01-09 14:32:55 -08:00
Junio C Hamano e6932248fc Merge branch 'bc/submitting-patches-in-asciidoc'
Doc readability update.

* bc/submitting-patches-in-asciidoc:
  doc/SubmittingPatches: improve text formatting
2018-01-09 14:32:54 -08:00
Junio C Hamano a19caa7d63 Merge branch 'sg/travis-skip-identical-test'
Avoid repeatedly testing the same tree in TravisCI that have been
tested successfully already.

* sg/travis-skip-identical-test:
  travis-ci: record and skip successfully built trees
  travis-ci: create the cache directory early in the build process
  travis-ci: print the "tip of branch is exactly at tag" message in color
2018-01-09 14:32:54 -08:00
Junio C Hamano a09a5e6c36 Merge branch 'ab/dc-sha1-loose-ends'
Tying loose ends for the recent integration work of
collision-detecting SHA-1 implementation.

* ab/dc-sha1-loose-ends:
  Makefile: NO_OPENSSL=1 should no longer imply BLK_SHA1=1
2018-01-09 14:32:53 -08:00
Junio C Hamano 26393822f8 Merge branch 'sg/travis-fixes'
Assorted updates for TravisCI integration.

* sg/travis-fixes:
  travis-ci: only print test failures if there are test results available
  travis-ci: save prove state for the 32 bit Linux build
  travis-ci: don't install default addon packages for the 32 bit Linux build
  travis-ci: fine tune the use of 'set -x' in 'ci/*' scripts
2018-01-09 14:32:53 -08:00
Andreas G. Schacker 30221a3389 doc/read-tree: remove obsolete remark
Earlier versions of `git read-tree` required the `--prefix` option value
to end with a slash. This restriction was eventually lifted without a
corresponding amendment to the documentation.

Signed-off-by: Andreas G. Schacker <andreas.schacker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:37:09 -08:00
Peter Krefting 9d4b85be54 l10n: sv.po: Update Swedish translation (3288t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2018-01-09 20:10:14 +01:00
Junio C Hamano 02a5f25d95 Merge branch 'js/misc-git-gui-stuff' of ../git-gui
* 'js/misc-git-gui-stuff' of ../git-gui:
  git-gui: allow Ctrl+T to toggle multiple paths
  git-gui: fix exception when trying to stage with empty file list
  git-gui: avoid exception upon Ctrl+T in an empty list
  git gui: fix staging a second line to a 1-line file
2018-01-09 11:07:03 -08:00
Johannes Schindelin 76756d6706 git-gui: allow Ctrl+T to toggle multiple paths
It is possible to select multiple files in the "Unstaged Changes" and
the "Staged Changes" lists. But when hitting Ctrl+T, surprisingly only
one entry is handled, not all selected ones.

Let's just use the same code path as for the "Stage To Commit" and the
"Unstage From Commit" menu items.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:02:40 -08:00
Johannes Schindelin 2cd9179c14 git-gui: fix exception when trying to stage with empty file list
If there is nothing to stage, there is nothing to stage. Let's not try
to, even if the file list contains nothing at all.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:02:40 -08:00
Johannes Schindelin 2365e5b174 git-gui: avoid exception upon Ctrl+T in an empty list
Previously unstaged files can be staged by clicking on them and then
pressing Ctrl+T. Conveniently, the next unstaged file is selected
automatically so that the unstaged files can be staged by repeatedly
pressing Ctrl+T.

When a user hits Ctrl+T one time too many, though, Git GUI used to throw
this exception:

	expected number but got ""
	expected number but got ""
	    while executing
	"expr {int([lindex [$w tag ranges in_diff] 0])}"
	    (procedure "toggle_or_diff" line 13)
	    invoked from within
	"toggle_or_diff toggle .vpane.files.workdir.list "
	    (command bound to event)

Let's just avoid that by skipping the operation when there are no more
files to stage.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:02:40 -08:00
Johannes Schindelin 6d02c1e204 git gui: fix staging a second line to a 1-line file
When a 1-line file is augmented by a second line, and the user tries to
stage that single line via the "Stage Line" context menu item, we do not
want to see "apply: corrupt patch at line 5".

The reason for this error was that the hunk header looks like this:

	@@ -1 +1,2 @@

but the existing code expects the original range always to contain a
comma. This problem is easily fixed by cutting the string "1 +1,2"
(that Git GUI formerly mistook for the starting line) at the space.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:02:40 -08:00
Yasushi SHOJI f0a6068a9f bisect: debug: convert struct object to object_id
The commit f2fd0760 ("Convert struct object to object_id",
2015-11-10) converted struct object to object_id but forgot to
adjust a few callers in a debug function show_list(), which is
ifdef'ed to noop, in bisect.c.

Signed-off-by: Yasushi SHOJI <Yasushi.SHOJI@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 10:55:32 -08:00
Junio C Hamano 5b1c54ac99 Merge branch 'ew/empty-merge-with-dirty-index-maint' into ew/empty-merge-with-dirty-index
* ew/empty-merge-with-dirty-index-maint:
  merge-recursive: do not look at the index during recursive merge
2018-01-09 10:41:37 -08:00
Junio C Hamano f309e8e768 merge-recursive: do not look at the index during recursive merge
When merging another branch into ours, if their tree is the same as
the common ancestor's, we can declare that our tree represents the
result of three-way merge.  In such a case, the recursive merge
backend incorrectly used to create a commit out of our index, even
when the index has changes.

A recent fix attempted to prevent this by adding a comparison
between "our" tree and the index, but forgot that this check must be
restricted only to the outermost merge.  Inner merges performed by
the recursive backend across merge bases are by definition made from
scratch without having any local changes added to the index.  The
call to index_has_changes() during an inner merge is working on the
index that has no relation to the merge being performed, preventing
legitimate merges from getting carried out.

Fix it by limiting the check to the outermost merge.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 10:39:30 -08:00
Dimitriy Ryazantcev 846bb11707 l10n: ru.po: update Russian translation
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
2018-01-09 13:22:24 +02:00
Changwoo Ryu 4b0d6bdafa l10n: TEAMS: Add ko team members
Add Gwan-gyeong Mun and Sihyeon Jang.

Signed-off-by: Changwoo Ryu <cwryu@debian.org>
2018-01-09 11:42:03 +09:00
Jiang Xin 77482d05d4 Merge branch 'ko/merge-l10n' of https://github.com/git-l10n-ko/git-l10n-ko
* 'ko/merge-l10n' of https://github.com/git-l10n-ko/git-l10n-ko:
  l10n: ko.po: Update Korean translation
2018-01-09 09:47:11 +08:00
Thomas Gummerer 03e7833f3a oidset: don't return value from oidset_init
c3a9ad3117 ("oidset: add iterator methods to oidset", 2017-11-21)
introduced a 'oidset_init()' function in oidset.h, which has void as
return type, but returns an expression.

This makes the solaris compiler fail with:

    "oidset.h", line 30: void function cannot return value

As the return type is void, and even the return type of the expression
we're trying to return (oidmap_init) is void just remove the return
statement to fix the compiler error.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-08 15:24:35 -08:00
SZEDER Gábor 3c93b82920 travis-ci: build Git during the 'script' phase
Ever since we started building and testing Git on Travis CI (522354d70
(Add Travis CI support, 2015-11-27)), we build Git in the
'before_script' phase and run the test suite in the 'script' phase
(except in the later introduced 32 bit Linux and Windows build jobs,
where we build in the 'script' phase').

Contrarily, the Travis CI practice is to build and test in the
'script' phase; indeed Travis CI's default build command for the
'script' phase of C/C++ projects is:

  ./configure && make && make test

The reason why Travis CI does it this way and why it's a better
approach than ours lies in how unsuccessful build jobs are
categorized.  After something went wrong in a build job, its state can
be:

  - 'failed', if a command in the 'script' phase returned an error.
    This is indicated by a red 'X' on the Travis CI web interface.

  - 'errored', if a command in the 'before_install', 'install', or
    'before_script' phase returned an error, or the build job exceeded
    the time limit.  This is shown as a red '!' on the web interface.

This makes it easier, both for humans looking at the Travis CI web
interface and for automated tools querying the Travis CI API, to
decide when an unsuccessful build is our responsibility requiring
human attention, i.e. when a build job 'failed' because of a compiler
error or a test failure, and when it's caused by something beyond our
control and might be fixed by restarting the build job, e.g. when a
build job 'errored' because a dependency couldn't be installed due to
a temporary network error or because the OSX build job exceeded its
time limit.

The drawback of building Git in the 'before_script' phase is that one
has to check the trace log of all 'errored' build jobs, too, to see
what caused the error, as it might have been caused by a compiler
error.  This requires additional clicks and page loads on the web
interface and additional complexity and API requests in automated
tools.

Therefore, move building Git from the 'before_script' phase to the
'script' phase, updating the script's name accordingly as well.
'ci/run-builds.sh' now becomes basically empty, remove it.  Several of
our build job configurations override our default 'before_script' to
do nothing; with this change our default 'before_script' won't do
anything, either, so remove those overriding directives as well.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-08 14:07:41 -08:00
Thomas Gummerer bba067d2fa stash: don't delete untracked files that match pathspec
Currently when 'git stash push -- <pathspec>' is used, untracked files
that match the pathspec will be deleted, even though they do not end up
in a stash anywhere.

This is because the original commit introducing the pathspec feature in
git stash push (df6bba0937 ("stash: teach 'push' (and 'create_stash') to
honor pathspec", 2017-02-28)) used the sequence of 'git reset <pathspec>
&& git ls-files --modified <pathspec> | git checkout-index && git clean
<pathspec>'.

The intention was to emulate what 'git reset --hard -- <pathspec>' would
do.  The call to 'git clean' was supposed to clean up the files that
were unstaged by 'git reset'.  This would work fine if the pathspec
doesn't match any files that were untracked before 'git stash push --
<pathspec>'.  However if <pathspec> matches a file that was untracked
before invoking the 'stash' command, all untracked files matching the
pathspec would inadvertently be deleted as well, even though they
wouldn't end up in the stash, and are therefore lost.

This behaviour was never what was intended, only blobs that also end up
in the stash should be reset to their state in HEAD, previously
untracked files should be left alone.

To achieve this, first match what's in the index and what's in the
working tree by adding all changes to the index, ask diff-index what
changed between HEAD and the current index, and then apply that patch in
reverse to get rid of the changes, which includes removal of added
files and resurrection of removed files.

Reported-by: Reid Price <reid.price@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-08 13:02:25 -08:00
Changwoo Ryu 4a7e1b2475 l10n: ko.po: Update Korean translation
Signed-off-by: Changwoo Ryu <cwryu@debian.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
Signed-off-by: Gwan-gyeong Mun <elongbug@gmail.com>
Reviewed-by: Changwoo Ryu <cwryu@debian.org>
2018-01-08 17:59:35 +09:00
Jiang Xin daa8563143 Merge branch '2.16' of https://github.com/ChrisADR/git-po
* '2.16' of https://github.com/ChrisADR/git-po:
  l10n: es.po: Spanish translation 2.16.0 round 2
2018-01-08 10:59:24 +08:00
Jiang Xin 9c315b944d Merge branch 'fr_2.16-rc1' of git://github.com/jnavila/git
* 'fr_2.16-rc1' of git://github.com/jnavila/git:
  l10n: fr.po 2.16 round 2
2018-01-08 09:17:24 +08:00
Jean-Noel Avila 2acb3d4992 l10n: fr.po 2.16 round 2
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2018-01-07 18:57:48 +01:00
Christopher Díaz Riveros 521437fe7c l10n: es.po: Spanish translation 2.16.0 round 2
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
2018-01-07 12:15:35 -05:00
Tran Ngoc Quan fe73f3eecc l10n: vi.po(3288t): Updated Vietnamese translation for v2.16.0 round 2
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2018-01-07 08:20:27 +07:00
Jiang Xin 005c62fe46 l10n: git.pot: v2.16.0 round 2 (8 new, 4 removed)
Generate po/git.pot from v2.16.0-rc1 for git v2.16.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2018-01-07 07:50:31 +08:00
Jiang Xin 7398243260 Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
  l10n: es.po: Update Spanish Translation v2.16.0
  l10n: fr.po v2.16.0 round 1
  l10n: bg.po: Updated Bulgarian translation (3284t)
  l10n: sv.po: Update Swedish translation (3284t0f0u)
  l10n: fr.po: "worktree list" mistranslated as prune
  l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)
  l10n: fixes to German translation
  l10n: Update Spanish translation
  l10n: zh_CN translate parameter name
  l10n: zh_CN Fix typo
  l10n: Fixes to Catalan translation
2018-01-07 07:49:43 +08:00
Jiang Xin 48f2a74589 Merge branch '2.16' of https://github.com/ChrisADR/git-po
* '2.16' of https://github.com/ChrisADR/git-po:
  l10n: es.po: Update Spanish Translation v2.16.0
2018-01-06 10:26:30 +08:00
Jiang Xin 4a6b2cb588 Merge branch 'fr_2.16' of git://github.com/jnavila/git
* 'fr_2.16' of git://github.com/jnavila/git:
  l10n: fr.po v2.16.0 round 1
  l10n: fr.po: "worktree list" mistranslated as prune
2018-01-06 10:24:52 +08:00
Junio C Hamano 36438dc19d Git 2.16-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 13:45:17 -08:00
Junio C Hamano 8c8ddbd082 Merge branch 'js/sequencer-cleanups'
Code cleanup.

* js/sequencer-cleanups:
  sequencer: do not invent whitespace when transforming OIDs
  sequencer: report when noop has an argument
  sequencer: remove superfluous conditional
  sequencer: strip bogus LF at end of error messages
  rebase: do not continue when the todo list generation failed
2018-01-05 13:28:12 -08:00
Junio C Hamano bc27a2e2fc Merge branch 'jh/memihash-opt'
Squelch compiler warning.

* jh/memihash-opt:
  t/helper/test-lazy-name-hash: fix compilation
2018-01-05 13:28:11 -08:00
Junio C Hamano e82bbcbf60 Merge branch 'tb/test-lint-wc-l'
Test update.

* tb/test-lint-wc-l:
  check-non-portable-shell.pl: `wc -l` may have leading WS
2018-01-05 13:28:11 -08:00
Junio C Hamano 0956eaa621 Merge branch 'rs/use-argv-array-in-child-process'
Code cleanup.

* rs/use-argv-array-in-child-process:
  send-pack: use internal argv_array of struct child_process
  http: use internal argv_array of struct child_process
2018-01-05 13:28:10 -08:00
Junio C Hamano a778ba1c71 Merge branch 'ld/p4-multiple-shelves'
"git p4" update.

* ld/p4-multiple-shelves:
  git-p4: update multiple shelved change lists
2018-01-05 13:28:10 -08:00
Junio C Hamano a741e2825b Merge branch 'jd/fix-strbuf-add-urlencode-bytes'
Bytes with high-bit set were encoded incorrectly and made
credential helper fail.

* jd/fix-strbuf-add-urlencode-bytes:
  strbuf: fix urlencode format string on signed char
2018-01-05 13:28:10 -08:00
Junio C Hamano 843d94b3cd Merge branch 'ew/empty-merge-with-dirty-index'
"git merge -s recursive" did not correctly abort when the index is
dirty, if the merged tree happened to be the same as the current
HEAD, which has been fixed.

* ew/empty-merge-with-dirty-index:
  merge-recursive: avoid incorporating uncommitted changes in a merge
  move index_has_changes() from builtin/am.c to merge.c for reuse
  t6044: recursive can silently incorporate dirty changes in a merge
2018-01-05 13:28:09 -08:00
Junio C Hamano fa62d0392b Merge branch 'db/doc-config-section-names-with-bs'
Doc update.

* db/doc-config-section-names-with-bs:
  config.txt: document behavior of backslashes in subsections
2018-01-05 13:28:09 -08:00
Junio C Hamano 07b747d324 Merge branch 'jk/test-suite-tracing'
Assorted fixes around running tests with "-x" tracing option.

* jk/test-suite-tracing:
  t/Makefile: introduce TEST_SHELL_PATH
  test-lib: make "-x" work with "--verbose-log"
  t5615: avoid re-using descriptor 4
  test-lib: silence "-x" cleanup under bash
2018-01-05 13:28:09 -08:00
Stefan Beller 7dcc1f4df8 submodule: submodule_move_head omits old argument in forced case
When using hard reset or forced checkout with the option to recurse into
submodules, the submodules need to be reset, too.

It turns out that we need to omit the duplicate old argument to read-tree
in all forced cases to omit the 2 way merge and use the more assertive
behavior of reading the specific new tree into the index and updating
the working tree.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 12:35:35 -08:00
Stefan Beller ad17312e11 unpack-trees: oneway_merge to update submodules
When there is a one way merge, each submodule needs to be one way merged
as well, if we're asked to recurse into submodules.

In case of a submodule, check if it is up-to-date, otherwise set the
flag CE_UPDATE, which will trigger an update of it in the phase updating
the tree later.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 12:35:35 -08:00
Stefan Beller 63d963a470 t/lib-submodule-update.sh: fix test ignoring ignored files in submodules
It turns out that the test replacing a submodule with a file with
the submodule containing an ignored file is incorrectly titled,
because the test put the file in place, but never ignored that file.
When having an untracked file Instead of an ignored file in the
submodule, git should refuse to remove the submodule, but that is
a bug in the implementation of recursing into submodules, such that
the test just passed, removing the untracked file.

Fix the test first; in a later patch we'll fix gits behavior,
that will make sure untracked files are not deleted.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 12:35:35 -08:00
Stefan Beller 6419a12397 t/lib-submodule-update.sh: clarify test
Keep the local branch name as the upstream branch name to avoid confusion.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 12:35:04 -08:00
Johannes Schindelin dd6fb0053c rebase -p: fix quoting when calling git merge
It has been reported that strategy arguments are not passed to `git
merge` correctly when rebasing interactively, preserving merges.

The reason is that the strategy arguments are already quoted, and then
quoted again.

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

Original-patch-by: Kim Gybels <kgybels@infogroep.be>
Also-reported-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 12:26:01 -08:00