Commit graph

47964 commits

Author SHA1 Message Date
Johannes Schindelin 47d4ac019b t3404: relax rebase.missingCommitsCheck tests
These tests were a bit anal about the *exact* warning/error message
printed by git rebase. But those messages are intended for the *end
user*, therefore it does not make sense to test so rigidly for the
*exact* wording.

In the following, we will reimplement the missing commits check in
the sequencer, with slightly different words.

So let's just test for the parts in the warning/error message that
we *really* care about, nothing more, nothing less.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 15:35:05 -07:00
Johannes Schindelin 3546c8d927 rebase -i: also expand/collapse the SHA-1s via the rebase--helper
This is crucial to improve performance on Windows, as the speed is now
mostly dominated by the SHA-1 transformation (because it spawns a new
rev-parse process for *every* line, and spawning processes is pretty
slow from Git for Windows' MSYS2 Bash).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 15:35:05 -07:00
Johannes Schindelin 1f4044af7f rebase -i: do not invent onelines when expanding/collapsing SHA-1s
To avoid problems with short SHA-1s that become non-unique during the
rebase, we rewrite the todo script with short/long SHA-1s before and
after letting the user edit the script. Since SHA-1s are not intuitive
for humans, rebase -i also provides the onelines (commit message
subjects) in the script, purely for the user's convenience.

It is very possible to generate a todo script via different means than
rebase -i and then to let rebase -i run with it; In this case, these
onelines are not required.

And this is where the expand/collapse machinery has a bug: it *expects*
that oneline, and failing to find one reuses the previous SHA-1 as
"oneline".

It was most likely an oversight, and made implementation in the (quite
limiting) shell script language less convoluted. However, we are about
to reimplement performance-critical parts in C (and due to spawning a
git.exe process for every single line of the todo script, the
expansion/collapsing of the SHA-1s *is* performance-hampering on
Windows), therefore let's fix this bug to make cross-validation with the
C version of that functionality possible.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 15:35:05 -07:00
Johannes Schindelin 4b8b65d706 rebase -i: remove useless indentation
The commands used to be indented, and it is nice to look at, but when we
transform the SHA-1s, the indentation is removed. So let's do away with it.

For the moment, at least: when we will use the upcoming rebase--helper
to transform the SHA-1s, we *will* keep the indentation and can
reintroduce it. Yet, to be able to validate the rebase--helper against
the output of the current shell script version, we need to remove the
extra indentation.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 15:35:05 -07:00
Johannes Schindelin 62db524779 rebase -i: generate the script via rebase--helper
The first step of an interactive rebase is to generate the so-called "todo
script", to be stored in the state directory as "git-rebase-todo" and to
be edited by the user.

Originally, we adjusted the output of `git log <options>` using a simple
sed script. Over the course of the years, the code became more
complicated. We now use shell scripting to edit the output of `git log`
conditionally, depending whether to keep "empty" commits (i.e. commits
that do not change any files).

On platforms where shell scripting is not native, this can be a serious
drag. And it opens the door for incompatibilities between platforms when
it comes to shell scripting or to Unix-y commands.

Let's just re-implement the todo script generation in plain C, using the
revision machinery directly.

This is substantially faster, improving the speed relative to the
shell script version of the interactive rebase from 2x to 3x on Windows.

Note that the rearrange_squash() function in git-rebase--interactive
relied on the fact that we set the "format" variable to the config setting
rebase.instructionFormat. Relying on a side effect like this is no good,
hence we explicitly perform that assignment (possibly again) in
rearrange_squash().

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 15:35:05 -07:00
Johannes Schindelin 4e7524e012 t3415: verify that an empty instructionFormat is handled as before
An upcoming patch will move the todo list generation into the
rebase--helper. An early version of that patch regressed on an empty
rebase.instructionFormat value (the shell version could not discern
between an empty one and a non-existing one, but the C version used the
empty one as if that was intended to skip the oneline from the `pick
<hash>` lines).

Let's verify that this still works as before.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-27 15:35:05 -07:00
Junio C Hamano 5800c63717 Git 2.14-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-24 14:50:35 -07:00
Junio C Hamano 9e3958e86d Merge https://github.com/git-l10n/git-po
* https://github.com/git-l10n/git-po:
  l10n: git.pot: v2.14.0 round 2 (9 new, 2 removed)
  l10n: sv.po: Update Swedish translation (3206t0f0u)
  l10n: ko.po: Update Korean translation
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (3206t)
  l10n: vi.po(3206t): Update Vietnamese translation
  l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)
  l10n: ru.po: update Russian translation
  l10n: Fixes to Catalan translation
2017-07-24 14:01:08 -07:00
Jiang Xin 91d443d0d8 l10n: git.pot: v2.14.0 round 2 (9 new, 2 removed)
Generate po/git.pot from v2.14.0-rc0-40-g5eada8987e for git v2.14.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2017-07-24 22:00:44 +08:00
Jiang Xin 92125538ff Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
  l10n: sv.po: Update Swedish translation (3206t0f0u)
  l10n: ko.po: Update Korean translation
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (3206t)
  l10n: vi.po(3206t): Update Vietnamese translation
  l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)
  l10n: ru.po: update Russian translation
  l10n: Fixes to Catalan translation
2017-07-24 21:53:47 +08:00
Jiang Xin 842e0d63aa Merge branch 'master' of git://github.com/nafmo/git-l10n-sv
* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (3206t0f0u)
2017-07-22 06:19:21 +08:00
Junio C Hamano 5eada8987e Sync with maint
* maint:
  fixes from 'master' for 2.13.4
2017-07-21 15:13:25 -07:00
Junio C Hamano 2187e112d7 fixes from 'master' for 2.13.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-21 15:06:09 -07:00
Junio C Hamano 38351249be Merge branch 'ew/fd-cloexec-fix' into maint
Portability/fallback fix.

* ew/fd-cloexec-fix:
  set FD_CLOEXEC properly when O_CLOEXEC is not supported
2017-07-21 15:03:40 -07:00
Junio C Hamano bae7e3f153 Merge branch 'ks/fix-rebase-doc-picture' into maint
Doc update.

* ks/fix-rebase-doc-picture:
  doc: correct a mistake in an illustration
2017-07-21 15:03:39 -07:00
Junio C Hamano bdea5bae22 Merge branch 'js/alias-case-sensitivity' into maint
A recent update broke an alias that contained an uppercase letter.

* js/alias-case-sensitivity:
  alias: compare alias name *case-insensitively*
  t1300: demonstrate that CamelCased aliases regressed
2017-07-21 15:03:38 -07:00
Junio C Hamano ba1c08942c Merge branch 'bb/unicode-10.0' into maint
Update the character width tables.

* bb/unicode-10.0:
  unicode: update the width tables to Unicode 10
2017-07-21 15:03:38 -07:00
Junio C Hamano 19533e2c71 Hopefully the final last-minute fix before -rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-21 15:02:51 -07:00
Junio C Hamano 4326211593 Merge branch 'ks/doc-fixes'
Doc clean-up.

* ks/doc-fixes:
  doc: reformat the paragraph containing the 'cut-line'
  doc: camelCase the i18n config variables to improve readability
2017-07-21 14:57:37 -07:00
Junio C Hamano 3e05c53431 Merge branch 'rj/cygwin-fread-reads-directories'
It turns out that Cygwin also needs the fopen() wrapper that
returns failure when a directory is opened for reading.

* rj/cygwin-fread-reads-directories:
  config.mak.uname: set FREAD_READS_DIRECTORIES for cygwin
2017-07-21 14:57:37 -07:00
Junio C Hamano a491307448 Merge branch 'jc/po-pritime-fix'
We started using "%" PRItime, imitating "%" PRIuMAX and friends, as
a way to format the internal timestamp value, but this does not
play well with gettext(1) i18n framework, and causes "make pot"
that is run by the l10n coordinator to create a broken po/git.pot
file.  This is a possible workaround for that problem.

* jc/po-pritime-fix:
  Makefile: help gettext tools to cope with our custom PRItime format
2017-07-21 14:57:37 -07:00
Ramsay Jones a5956d6a56 config.mak.uname: set FREAD_READS_DIRECTORIES for cygwin
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-21 11:58:06 -07:00
Junio C Hamano 981adb928e A few more topics while waiting for the po/PRItime resolution
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20 16:31:56 -07:00
Junio C Hamano 4f0b213699 Merge branch 'mt/p4-parse-G-output'
Use "p4 -G" to make "p4 changes" output more Python-friendly
to parse.

* mt/p4-parse-G-output:
  git-p4: filter for {'code':'info'} in p4CmdList
  git-p4: parse marshal output "p4 -G" in p4 changes
  git-p4: git-p4 tests with p4 triggers
2017-07-20 16:30:00 -07:00
Junio C Hamano 2842e06352 Merge branch 'ew/fd-cloexec-fix'
Portability/fallback fix.

* ew/fd-cloexec-fix:
  set FD_CLOEXEC properly when O_CLOEXEC is not supported
2017-07-20 16:30:00 -07:00
Junio C Hamano e4efb39555 Merge branch 'jk/build-with-asan'
A recent update made it easier to use "-fsanitize=" option while
compiling but supported only one sanitize option.  Allow more than
one to be combined, joined with a comma, like "make SANITIZE=foo,bar".

* jk/build-with-asan:
  Makefile: allow combining UBSan with other sanitizers
2017-07-20 16:29:59 -07:00
Junio C Hamano d5bfa469f4 Merge branch 'jk/test-copy-bytes-fix'
A test fix.

* jk/test-copy-bytes-fix:
  t: handle EOF in test_copy_bytes()
2017-07-20 16:29:59 -07:00
Junio C Hamano 099b74b4b2 Merge branch 'js/alias-case-sensitivity'
A recent update broke an alias that contained an uppercase letter.

* js/alias-case-sensitivity:
  alias: compare alias name *case-insensitively*
  t1300: demonstrate that CamelCased aliases regressed
2017-07-20 16:29:59 -07:00
Peter Krefting 7b7c15b881 l10n: sv.po: Update Swedish translation (3206t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2017-07-20 23:00:16 +02:00
Ævar Arnfjörð Bjarmason b7ef54f273 RelNotes: mention "sha1dc: optionally use sha1collisiondetection as a submodule"
To note that merely cloning git.git without --recurse-submodules
doesn't get you a full copy of the code anymore. See
5f6482d642 ("RelNotes: mention "log: make --regexp-ignore-case work
with --perl-regexp"", 2017-07-20).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20 13:34:03 -07:00
Ævar Arnfjörð Bjarmason b18a38bfcf RelNotes: mention "log: make --regexp-ignore-case work with --perl-regexp"
To inform users that they can use --regexp-ignore-case now, and that
existing scripts which relied on that + PCRE may be buggy. See
9e3cbc59d5 ("log: make --regexp-ignore-case work with --perl-regexp",
2017-05-20).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20 13:33:57 -07:00
Ævar Arnfjörð Bjarmason 9902d36552 RelNotes: mention "log: add -P as a synonym for --perl-regexp"
To inform users that they can use the short form now. See
7531a2dd87 ("log: add -P as a synonym for --perl-regexp", 2017-05-25).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20 13:33:50 -07:00
Junio C Hamano fc0fd5b23b Makefile: help gettext tools to cope with our custom PRItime format
We started using our own timestamp_t type and PRItime format
specifier to go along with it, so that we can later change the
underlying type and output format more easily, but this does not
play well with gettext tools.

Because gettext tools need to keep the *.po file portable across
platforms, they have to special-case the format specifiers like
PRIuMAX that are known types in inttypes.h, instead of letting CPP
handle strings like

    "%" PRIuMAX " seconds ago"

as an ordinary string concatenation.  They fundamentally cannot do
the same for our own custom type/format.

Given that po/git.pot needs to be generated only once every release
and by only one person, i.e. the l10n coordinator, let's update the
Makefile rule to generate po/git.pot so that gettext tools are run
on a munged set of sources in which all mentions of PRItime are
replaced with PRIuMAX, which is what we happen to use right now.

This way, developers do not have to care that PRItime does not play
well with gettext, and translators do not have to care that we use
our own PRItime.

The credit for the idea to munge the source files goes to Dscho.
Possible bugs are mine.

Helped-by: Jiang Xin <worldhello.net@gmail.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20 12:21:18 -07:00
Changwoo Ryu e3fe4f7612 l10n: ko.po: Update Korean translation
Signed-off-by: Changwoo Ryu <cwryu@debian.org>
2017-07-19 17:15:54 +09:00
Kaartic Sivaraam 3a33fe5c97 doc: reformat the paragraph containing the 'cut-line'
The paragraph that describes the 'scissors' cleanup mode of
'commit' had the 'cut-line' in the middle of a sentence. This
made it possible for the line to get wrapped on smaler windows.
This shouldn't be the case as it makes it hard for the user to
understand the structure of the cut-line.

Reformat the pragraph to make the 'cut-line' stand on a line of
it's own thus distinguishing it from the rest of the paragraph.
This further prevents it from getting wrapped to some extent.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-18 15:04:49 -07:00
Junio C Hamano cac25fc330 A few more topics before 2.14-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-18 12:52:49 -07:00
Junio C Hamano 764046f6b0 Merge branch 'jk/gc-pre-detach-under-hook'
We run an early part of "git gc" that deals with refs before
daemonising (and not under lock) even when running a background
auto-gc, which caused multiple gc processes attempting to run the
early part at the same time.  This is now prevented by running the
early part also under the GC lock.

* jk/gc-pre-detach-under-hook:
  gc: run pre-detach operations under lock
2017-07-18 12:48:10 -07:00
Junio C Hamano 1115749223 Merge branch 'jn/hooks-pre-rebase-sample-fix'
Code clean-up, that makes us in sync with Debian by one patch.

* jn/hooks-pre-rebase-sample-fix:
  pre-rebase hook: capture documentation in a <<here document
2017-07-18 12:48:10 -07:00
Junio C Hamano a11ab576d9 Merge branch 'rs/progress-overall-throughput-at-the-end'
The progress meter did not give a useful output when we haven't had
0.5 seconds to measure the throughput during the interval.  Instead
show the overall throughput rate at the end, which is a much more
useful number.

* rs/progress-overall-throughput-at-the-end:
  progress: show overall rate in last update
2017-07-18 12:48:09 -07:00
Junio C Hamano 33400c0e96 Merge branch 'tb/push-to-cygwin-unc-path'
On Cygwin, similar to Windows, "git push //server/share/repository"
ought to mean a repository on a network share that can be accessed
locally, but this did not work correctly due to stripping the double
slashes at the beginning.

This may need to be heavily tested before it gets unleashed to the
wild, as the change is at a fairly low-level code and would affect
not just the code to decide if the push destination is local.  There
may be unexpected fallouts in the path normalization.

* tb/push-to-cygwin-unc-path:
  cygwin: allow pushing to UNC paths
2017-07-18 12:48:09 -07:00
Jordi Mas 298082bc80 l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2017-07-18 21:06:06 +02:00
Kaartic Sivaraam 95791be750 doc: camelCase the i18n config variables to improve readability
The i18n config variable used weren't readable as they were in
the crude form of how git stores/uses it's config variables.

Improve it's readability by replacing them with camelCased versions
of config variables as it doesn't have any impact on it's usage.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 15:11:26 -07:00
Jeff King f7f6dc340e t: handle EOF in test_copy_bytes()
The test_copy_bytes() function claims to read up to N bytes,
or until it gets EOF. But we never handle EOF in our loop,
and a short input will cause perl to go into an infinite
loop of read() getting zero bytes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:55:43 -07:00
Eric Wong 9fb9495dae set FD_CLOEXEC properly when O_CLOEXEC is not supported
FD_CLOEXEC only applies to the file descriptor, so it needs to be
manipuluated via F_GETFD/F_SETFD.  F_GETFL/F_SETFL are for file
description flags.

Verified via strace with o_cloexec set to zero.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:52:16 -07:00
René Scharfe 425ca6710b Makefile: allow combining UBSan with other sanitizers
Multiple sanitizers can be specified as a comma-separated list.  Set
the flag NO_UNALIGNED_LOADS even if UndefinedBehaviorSanitizer is not
the only sanitizer to build with.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:50:27 -07:00
Johannes Schindelin 643df7e234 alias: compare alias name *case-insensitively*
It is totally legitimate to add CamelCased aliases, but due to the way
config keys are compared, the case does not matter.

Therefore, we must compare the alias name insensitively to the config
keys.

This fixes a regression introduced by a9bcf6586d (alias: use
the early config machinery to expand aliases, 2017-06-14).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:00:12 -07:00
Johannes Schindelin 084b044093 t1300: demonstrate that CamelCased aliases regressed
It is totally legitimate to add CamelCased aliases, but due to the way
config keys are compared, the case does not matter.

Except that now it does: the alias name is expected to be all
lower-case. This is a regression introduced by a9bcf6586d (alias: use
the early config machinery to expand aliases, 2017-06-14).

Noticed by Alejandro Pauly, diagnosed by Kevin Willford.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:00:04 -07:00
Alexander Shopov b61937fb62 l10n: bg.po: Updated Bulgarian translation (3206t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2017-07-16 22:52:07 +02:00
Tran Ngoc Quan 0e2a0915b3 l10n: vi.po(3206t): Update Vietnamese translation
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2017-07-15 13:53:33 +07:00
Jiang Xin 5b34e000f9 l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)
Generate po/git.pot from v2.14.0-rc0 for git v2.14.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2017-07-15 11:58:14 +08:00