Junio C Hamano [Mon, 18 Jun 2018 18:23:23 +0000 (11:23 -0700)]
Merge branch 'ks/branch-set-upstream'
A test title has been reworded to clarify it.
* ks/branch-set-upstream:
t3200: clarify description of --set-upstream test
Junio C Hamano [Mon, 18 Jun 2018 18:23:22 +0000 (11:23 -0700)]
Merge branch 'js/rebase-i-root-fix'
A regression to "rebase -i --root" introduced during this cycle has
been fixed.
* js/rebase-i-root-fix:
rebase --root: fix amending root commit messages
rebase --root: demonstrate a bug while amending root commit messages
Junio C Hamano [Mon, 18 Jun 2018 18:23:22 +0000 (11:23 -0700)]
Merge branch 'jk/ewah-bounds-check'
The code to read compressed bitmap was not careful to avoid reading
past the end of the file, which has been corrected.
* jk/ewah-bounds-check:
ewah: adjust callers of ewah_read_mmap()
ewah_read_mmap: bounds-check mmap reads
Junio C Hamano [Mon, 18 Jun 2018 17:21:24 +0000 (10:21 -0700)]
Merge tag 'l10n-2.18.0-rnd3' of git://github.com/git-l10n/git-po
l10n for Git 2.18.0 round 3
* tag 'l10n-2.18.0-rnd3' of git://github.com/git-l10n/git-po:
l10n: zh_CN: for git v2.18.0 l10n round 1 to 3
l10n: bg.po: Updated Bulgarian translation (3608t)
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round 3
l10n: fr.po v2.18.0 round 3
l10n: es.po: Spanish update for v2.18.0 round 3
l10n: git.pot: v2.18.0 round 3 (1 new, 1 removed)
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round2
l10n: bg.po: Updated Bulgarian translation (3608t)
l10n: es.po: Spanish update for v2.18.0 round 2
l10n: sv.po: Update Swedish translation (3608t0f0u)
l10n: sv.po: Update Swedish translation (3470t0f0u)
l10n: git.pot: v2.18.0 round 2 (144 new, 6 removed)
l10n: fr.po v2.18 round 1
l10n: vi(3470t): Updated Vietnamese translation for v2.18.0
l10n: es.po: Spanish update for v2.18.0 round 1
l10n: git.pot: v2.18.0 round 1 (108 new, 14 removed)
l10n: TEAMS: remove inactive de team members
l10n: de.po: fix typos
l10n: Update Catalan translation
Junio C Hamano [Mon, 18 Jun 2018 17:20:42 +0000 (10:20 -0700)]
A bunch of micro-fixes before going 2.18 final
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 18 Jun 2018 17:18:45 +0000 (10:18 -0700)]
Merge branch 'sb/blame-color'
Leakfix.
* sb/blame-color:
blame: release string_list after use in parse_color_fields()
Junio C Hamano [Mon, 18 Jun 2018 17:18:45 +0000 (10:18 -0700)]
Merge branch 'mw/doc-merge-enumfix'
Fix old merge glitch in Documentation during v2.13-rc0 era.
* mw/doc-merge-enumfix:
doc: update the order of the syntax `git merge --continue`
Junio C Hamano [Mon, 18 Jun 2018 17:18:44 +0000 (10:18 -0700)]
Merge branch 'en/rename-directory-detection'
Newly added codepath in merge-recursive had potential buffer
overrun, which has been fixed.
* en/rename-directory-detection:
merge-recursive: use xstrdup() instead of fixed buffer
Junio C Hamano [Mon, 18 Jun 2018 17:18:43 +0000 (10:18 -0700)]
Merge branch 'rd/doc-remote-tracking-with-hyphen'
Doc update.
* rd/doc-remote-tracking-with-hyphen:
Use hyphenated "remote-tracking branch" (docs and comments)
Junio C Hamano [Mon, 18 Jun 2018 17:18:43 +0000 (10:18 -0700)]
Merge branch 'jl/zlib-restore-nul-termination'
Make zlib inflate codepath more robust against versions of zlib
that clobber unused portion of outbuf.
* jl/zlib-restore-nul-termination:
packfile: correct zlib buffer handling
Junio C Hamano [Mon, 18 Jun 2018 17:18:42 +0000 (10:18 -0700)]
Merge branch 'ab/cred-netrc-no-autodie'
Hotfix for contrib/ stuff broken by this cycle.
* ab/cred-netrc-no-autodie:
git-credential-netrc: remove use of "autodie"
Junio C Hamano [Mon, 18 Jun 2018 17:18:42 +0000 (10:18 -0700)]
Merge branch 'km/doc-workflows-typofix'
Typofix.
* km/doc-workflows-typofix:
gitworkflows: fix grammar in 'Merge upwards' rule
Junio C Hamano [Mon, 18 Jun 2018 17:18:41 +0000 (10:18 -0700)]
Merge branch 'ld/git-p4-updates'
"git p4" updates.
* ld/git-p4-updates:
git-p4: auto-size the block
git-p4: narrow the scope of exceptions caught when parsing an int
git-p4: raise exceptions from p4CmdList based on error from p4 server
git-p4: better error reporting when p4 fails
git-p4: add option to disable syncing of p4/master with p4
git-p4: disable-rebase: allow setting this via configuration
git-p4: add options --commit and --disable-rebase
Junio C Hamano [Mon, 18 Jun 2018 17:18:41 +0000 (10:18 -0700)]
Merge branch 'rd/diff-options-typofix'
Typofix.
* rd/diff-options-typofix:
diff-options.txt: fix minor typos, font inconsistencies, in docs
Junio C Hamano [Mon, 18 Jun 2018 17:18:40 +0000 (10:18 -0700)]
Merge branch 'rd/comment-typofix-in-sha1-file'
In code comment typofix
* rd/comment-typofix-in-sha1-file:
sha1-file.c: correct $GITDIR to $GIT_DIR in a comment
SZEDER Gábor [Mon, 18 Jun 2018 10:46:09 +0000 (12:46 +0200)]
RelNotes 2.18: minor fix to entry about dynamically loading completions
It was not "newer versions of bash" but newer versions of
bash-completion that made commit
085e2ee0e6 (completion: load
completion file for external subcommand, 2018-04-29) both necessary
and possible.
Update the corresponding RelNotes entry accordingly.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Sat, 16 Jun 2018 19:00:38 +0000 (21:00 +0200)]
rebase --root: fix amending root commit messages
The code path that triggered that "BUG" really does not want to run
without an explicit commit message. In the case where we want to amend a
commit message, we have an *implicit* commit message, though: the one of
the commit to amend. Therefore, this code path should not even be
entered.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger [Fri, 15 Jun 2018 04:31:11 +0000 (00:31 -0400)]
rebase --root: demonstrate a bug while amending root commit messages
When splitting a repository, running `git rebase -i --root` to reword
the initial commit, Git dies with
BUG: sequencer.c:795: root commit without message.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 15 Jun 2018 03:44:43 +0000 (23:44 -0400)]
ewah: adjust callers of ewah_read_mmap()
The return value of ewah_read_mmap() is now an ssize_t,
since we could (in theory) process up to 32GB of data. This
would never happen in practice, but a corrupt or malicious
.bitmap or index file could convince us to do so.
Let's make sure that we don't stuff the value into an int,
which would cause us to incorrectly move our pointer
forward. We'd always move too little, since negative values
are used for reporting errors. So the worst case is just
that we end up reporting a corrupt file, not an
out-of-bounds read.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 15 Jun 2018 03:31:13 +0000 (23:31 -0400)]
ewah_read_mmap: bounds-check mmap reads
The on-disk ewah format tells us how big the ewah data is,
and we blindly read that much from the buffer without
considering whether the mmap'd data is long enough, which
can lead to out-of-bound reads.
Let's make sure we have data available before reading it,
both for the ewah header/footer as well as for the bit data
itself. In particular:
- keep our ptr/len pair in sync as we move through the
buffer, and check it before each read
- check the size for integer overflow (this should be
impossible on 64-bit, as the size is given as a 32-bit
count of 8-byte words, but is possible on a 32-bit
system)
- return the number of bytes read as an ssize_t instead of
an int, again to prevent integer overflow
- compute the return value using a pointer difference;
this should yield the same result as the existing code,
but makes it more obvious that we got our computations
right
The included test is far from comprehensive, as it just
picks a static point at which to truncate the generated
bitmap. But in practice this will hit in the middle of an
ewah and make sure we're at least exercising this code.
Reported-by: Luat Nguyen <root@l4w.io>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kaartic Sivaraam [Sun, 17 Jun 2018 11:56:27 +0000 (17:26 +0530)]
t3200: clarify description of --set-upstream test
Support for the --set-upstream option was removed in
52668846ea
(builtin/branch: stop supporting the "--set-upstream" option,
2017-08-17). The change did not completely remove the command
due to an issue noted in the commit's log message.
So, a test was added to ensure that a command which uses the
'--set-upstream' option fails instead of silently acting as an alias
for the '--set-upstream-to' option due to option parsing features.
To avoid confusion, clarify that the option is disabled intentionally
in the corresponding test description.
The test is expected to be around as long as we intentionally fail
on seeing the '--set-upstream' option which in turn we expect to
do for a period of time after which we can be sure that existing
users of '--set-upstream' are aware that the option is no
longer supported.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Mon, 28 May 2018 01:11:57 +0000 (09:11 +0800)]
l10n: zh_CN: for git v2.18.0 l10n round 1 to 3
Translate 251 new messages (3608t0f0u) for git 2.18.0.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Sun, 17 Jun 2018 14:44:08 +0000 (22:44 +0800)]
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 (3608t0f0u)
l10n: sv.po: Update Swedish translation (3470t0f0u)
Jiang Xin [Sun, 17 Jun 2018 14:41:43 +0000 (22:41 +0800)]
Merge branch 'master' of https://github.com/vnwildman/git
* 'master' of https://github.com/vnwildman/git:
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round 3
Jiang Xin [Sun, 17 Jun 2018 14:37:53 +0000 (22:37 +0800)]
Merge branch 'master' of git://github.com/alshopov/git-po
* 'master' of git://github.com/alshopov/git-po:
l10n: bg.po: Updated Bulgarian translation (3608t)
Jiang Xin [Sun, 17 Jun 2018 14:36:41 +0000 (22:36 +0800)]
Merge branch 'fr_2.18_rnd3' of git://github.com/jnavila/git
* 'fr_2.18_rnd3' of git://github.com/jnavila/git:
l10n: fr.po v2.18.0 round 3
Alexander Shopov [Sun, 17 Jun 2018 11:16:40 +0000 (13:16 +0200)]
l10n: bg.po: Updated Bulgarian translation (3608t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Tran Ngoc Quan [Sun, 17 Jun 2018 00:06:44 +0000 (07:06 +0700)]
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round 3
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Jean-Noël Avila [Sat, 16 Jun 2018 18:35:01 +0000 (20:35 +0200)]
l10n: fr.po v2.18.0 round 3
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Christopher Diaz Riveros [Sat, 16 Jun 2018 14:58:53 +0000 (09:58 -0500)]
l10n: es.po: Spanish update for v2.18.0 round 3
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Jiang Xin [Sat, 16 Jun 2018 14:06:45 +0000 (22:06 +0800)]
l10n: git.pot: v2.18.0 round 3 (1 new, 1 removed)
Generate po/git.pot from v2.18.0-rc2 for git v2.18.0 l10n round 3.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Sat, 16 Jun 2018 14:05:21 +0000 (22:05 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round2
l10n: bg.po: Updated Bulgarian translation (3608t)
l10n: es.po: Spanish update for v2.18.0 round 2
l10n: git.pot: v2.18.0 round 2 (144 new, 6 removed)
l10n: fr.po v2.18 round 1
l10n: vi(3470t): Updated Vietnamese translation for v2.18.0
l10n: es.po: Spanish update for v2.18.0 round 1
l10n: git.pot: v2.18.0 round 1 (108 new, 14 removed)
l10n: TEAMS: remove inactive de team members
l10n: de.po: fix typos
l10n: Update Catalan translation
Jiang Xin [Fri, 15 Jun 2018 02:04:25 +0000 (10:04 +0800)]
Merge branch 'master' of https://github.com/vnwildman/git
* 'master' of https://github.com/vnwildman/git:
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round2
Meng-Sung Wu [Thu, 14 Jun 2018 01:33:34 +0000 (09:33 +0800)]
doc: update the order of the syntax `git merge --continue`
The syntax "git merge <message> HEAD <commit>" has been removed. The
order of the syntax should also be updated.
Signed-off-by: Meng-Sung Wu <mengsungwu@fortunewhite.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 9 Jun 2018 11:26:53 +0000 (13:26 +0200)]
blame: release string_list after use in parse_color_fields()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sun, 10 Jun 2018 10:56:31 +0000 (12:56 +0200)]
merge-recursive: use xstrdup() instead of fixed buffer
Paths can be longer than PATH_MAX. Avoid a buffer overrun in
check_dir_renamed() by using xstrdup() to make a private copy safely.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tran Ngoc Quan [Thu, 14 Jun 2018 07:19:56 +0000 (14:19 +0700)]
l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round2
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Junio C Hamano [Wed, 13 Jun 2018 19:57:07 +0000 (12:57 -0700)]
Git 2.18-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 13 Jun 2018 19:50:46 +0000 (12:50 -0700)]
Merge branch 'jk/index-pack-maint'
"index-pack --strict" has been taught to make sure that it runs the
final object integrity checks after making the freshly indexed
packfile available to itself.
* jk/index-pack-maint:
index-pack: correct install_packed_git() args
index-pack: handle --strict checks of non-repo packs
prepare_commit_graft: treat non-repository as a noop
Junio C Hamano [Wed, 13 Jun 2018 19:50:45 +0000 (12:50 -0700)]
Merge branch 'sg/completion-zsh-workaround'
Work around zsh segfaulting when loading git-completion.zsh
* sg/completion-zsh-workaround:
completion: correct zsh detection when run from git-completion.zsh
Junio C Hamano [Wed, 13 Jun 2018 19:50:44 +0000 (12:50 -0700)]
Merge branch 'sb/submodule-merge-in-merge-recursive'
Finishing touches to a topic that already is in 'master'.
* sb/submodule-merge-in-merge-recursive:
merge-submodule: reduce output verbosity
Junio C Hamano [Wed, 13 Jun 2018 19:50:44 +0000 (12:50 -0700)]
Merge branch 'jk/submodule-fsck-loose-fixup'
Finishing touches to a topic that already is in 'maint'.
* jk/submodule-fsck-loose-fixup:
fsck: avoid looking at NULL blob->object
t7415: don't bother creating commit for symlink test
Jeremy Linton [Wed, 13 Jun 2018 14:22:07 +0000 (09:22 -0500)]
packfile: correct zlib buffer handling
The buffer being passed to zlib includes a NUL terminator that git
needs to keep in place. unpack_compressed_entry() attempts to detect
the case that the source buffer hasn't been fully consumed by
checking to see if the destination buffer has been over consumed.
This causes a problem, that more recent zlib patches have been
poisoning the unconsumed portions of the buffer which overwrites
the NUL byte, while correctly returning length and status.
Let's place the NUL at the end of the buffer after inflate returns
to assure that it doesn't result in problems for git even if its
been overwritten by zlib.
Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren [Tue, 12 Jun 2018 23:57:55 +0000 (16:57 -0700)]
RelNotes 2.18: clarify where directory rename detection applies
Mention that this feature works with some commands (merge and cherry-pick,
implying that it also works with commands that build on these like rebase
-m and rebase -i). Explicitly mentioning two commands hopefully implies
that it may not always work with other commands (am, and rebase without
flags that imply either -m or -i).
Also, since the directory rename detection from this cycle was
specifically added in merge-recursive and not diffcore-rename, remove the
'in "diff" family" phrase from the note. (Folks have requested in the
past that `git diff` detect directory renames and somehow simplify its
output, so it may be helpful to avoid implying that diff has any new
capability here.)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Thu, 7 Jun 2018 11:53:36 +0000 (07:53 -0400)]
Use hyphenated "remote-tracking branch" (docs and comments)
Use the obvious consensus of hyphenated "remote-tracking branch", and
fix an obvious typo, all in documentation and comments.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason [Wed, 13 Jun 2018 07:48:10 +0000 (07:48 +0000)]
git-credential-netrc: remove use of "autodie"
The "autodie" module was added in Perl 5.10.1, but our INSTALL
document says "version 5.8 or later is needed".
As discussed in <87efhfvxzu.fsf@evledraar.gmail.com> this script is in
contrib/, so we might not want to apply that policy, however in this
case "autodie" was recently added as a "gratuitous safeguard" in
786ef50a23 ("git-credential-netrc: accept gpg option",
2018-05-12) (see
<CAHqJXRE8OKSKcck1APHAHccLZhox+tZi8nNu2RA74RErX8s3Pg@mail.gmail.com>).
Looking at it more carefully the addition of "autodie" inadvertently
introduced a logic error, since having it is equivalent to this patch:
@@ -245,10 +244,10 @@ sub load_netrc {
if ($gpgmode) {
my @cmd = ($options{'gpg'}, qw(--decrypt), $file);
log_verbose("Using GPG to open $file: [@cmd]");
- open $io, "-|", @cmd;
+ open $io, "-|", @cmd or die "@cmd: $!";
} else {
log_verbose("Opening $file...");
- open $io, '<', $file;
+ open $io, '<', $file or die "$file: $!$!;
}
# nothing to do if the open failed (we log the error later)
As shown in the context the intent of that code is not do die but to
log the error later.
Per my reading of the file this was the only thing autodie was doing
in this file (there was no other code it altered). So let's remove it,
both to fix the logic error and to get rid of the dependency.
1. <87efhfvxzu.fsf@evledraar.gmail.com>
(https://public-inbox.org/git/87efhfvxzu.fsf@evledraar.gmail.com/)
2. <CAHqJXRE8OKSKcck1APHAHccLZhox+tZi8nNu2RA74RErX8s3Pg@mail.gmail.com>
(https://public-inbox.org/git/CAHqJXRE8OKSKcck1APHAHccLZhox+tZi8nNu2RA74RErX8s3Pg@mail.gmail.com/)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Fri, 8 Jun 2018 20:32:48 +0000 (21:32 +0100)]
git-p4: auto-size the block
git-p4 originally would fetch changes in one query. On large repos this
could fail because of the limits that Perforce imposes on the number of
items returned and the number of queries in the database.
To fix this, git-p4 learned to query changes in blocks of 512 changes,
However, this can be very slow - if you have a few million changes,
with each chunk taking about a second, it can be an hour or so.
Although it's possible to tune this value manually with the
"--changes-block-size" option, it's far from obvious to ordinary users
that this is what needs doing.
This change alters the block size dynamically by looking for the
specific error messages returned from the Perforce server, and reducing
the block size if the error is seen, either to the limit reported by the
server, or to half the current block size.
That means we can start out with a very large block size, and then let
it automatically drop down to a value that works without error, while
still failing correctly if some other error occurs.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Fri, 8 Jun 2018 20:32:47 +0000 (21:32 +0100)]
git-p4: narrow the scope of exceptions caught when parsing an int
The current code traps all exceptions around some code which parses an
integer, and then talks to Perforce.
That can result in errors from Perforce being ignored. Change the code
to only catch the integer conversion exceptions.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Fri, 8 Jun 2018 20:32:46 +0000 (21:32 +0100)]
git-p4: raise exceptions from p4CmdList based on error from p4 server
This change lays some groundwork for better handling of rowcount errors
from the server, where it fails to send us results because we requested
too many.
It adds an option to p4CmdList() to return errors as a Python exception.
The exceptions are derived from P4Exception (something went wrong),
P4ServerException (the server sent us an error code) and
P4RequestSizeException (we requested too many rows/results from the
server database).
This makes the code that handles the errors a bit easier.
The default behavior is unchanged; the new code is enabled with a flag.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Fri, 8 Jun 2018 20:32:45 +0000 (21:32 +0100)]
git-p4: better error reporting when p4 fails
Currently when p4 fails to run, git-p4 just crashes with an obscure
error message.
For example, if the P4 ticket has expired, you get:
Error: Cannot locate perforce checkout of <path> in client view
This change checks whether git-p4 can talk to the Perforce server when
the first P4 operation is attempted, and tries to print a meaningful
error message if it fails.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Fri, 8 Jun 2018 20:32:44 +0000 (21:32 +0100)]
git-p4: add option to disable syncing of p4/master with p4
Add an option to the git-p4 submit command to disable syncing
with Perforce.
This is useful for the case where a git-p4 mirror has been setup
on a server somewhere, running from (e.g.) cron, and developers
then clone from this. Having the local cloned copy also sync
from Perforce just isn't useful.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Fri, 8 Jun 2018 20:32:43 +0000 (21:32 +0100)]
git-p4: disable-rebase: allow setting this via configuration
This just lets you set the --disable-rebase option with the
git configuration options git-p4.disableRebase. If you're
using this option, you probably want to set it all the time
for a given repo.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Romain Merland [Fri, 1 Jun 2018 07:46:14 +0000 (09:46 +0200)]
git-p4: add options --commit and --disable-rebase
On a daily work with multiple local git branches, the usual way to
submit only a specified commit was to cherry-pick the commit on
master then run git-p4 submit. It can be very annoying to switch
between local branches and master, only to submit one commit. The
proposed new way is to select directly the commit you want to
submit.
Add option --commit to command 'git-p4 submit' in order to submit
only specified commit(s) in p4.
On a daily work developping software with big compilation time, one
may not want to rebase on his local git tree, in order to avoid long
recompilation.
Add option --disable-rebase to command 'git-p4 submit' in order to
disable rebase after submission.
Thanks-to: Cedric Borgese <cedric.borgese@gmail.com>
Reviewed-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Romain Merland <merlorom@yahoo.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kyle Meyer [Sat, 9 Jun 2018 15:19:43 +0000 (11:19 -0400)]
gitworkflows: fix grammar in 'Merge upwards' rule
Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Mon, 11 Jun 2018 18:20:53 +0000 (11:20 -0700)]
completion: correct zsh detection when run from git-completion.zsh
v2.18.0-rc0~90^2 (completion: reduce overhead of clearing cached
--options, 2018-04-18) worked around a bug in bash's "set" builtin on
MacOS by using compgen instead. It was careful to avoid breaking zsh
by guarding this workaround with
if [[ -n ${ZSH_VERSION-}} ]]
Alas, this interacts poorly with git-completion.zsh's bash emulation:
ZSH_VERSION='' . "$script"
Correct it by instead using a new GIT_SOURCING_ZSH_COMPLETION shell
variable to detect whether git-completion.bash is being sourced from
git-completion.zsh. This way, the zsh variant is used both when run
from zsh directly and when run via git-completion.zsh.
Reproduction recipe:
1. cd git/contrib/completion && cp git-completion.zsh _git
2. Put the following in a new ~/.zshrc file:
autoload -U compinit; compinit
autoload -U bashcompinit; bashcompinit
fpath=(~/src/git/contrib/completion $fpath)
3. Open zsh and "git <TAB>".
With this patch:
Triggers nice git-completion.bash based tab completion
Without:
contrib/completion/git-completion.bash:354: read-only variable: QISUFFIX
zsh:12: command not found: ___main
zsh:15: _default: function definition file not found
_dispatch:70: bad math expression: operand expected at `/usr/bin/g...'
Segmentation fault
Reported-by: Rick van Hattem <wolph@wol.ph>
Reported-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexander Shopov [Tue, 12 Jun 2018 07:35:27 +0000 (09:35 +0200)]
l10n: bg.po: Updated Bulgarian translation (3608t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Junio C Hamano [Mon, 11 Jun 2018 22:09:18 +0000 (15:09 -0700)]
index-pack: correct install_packed_git() args
The function does not start taking the repository object as a
parameter before v2.18 track. Make the topic mergeable to v2.17
maintenance track by dropping it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Mon, 11 Jun 2018 13:56:13 +0000 (09:56 -0400)]
diff-options.txt: fix minor typos, font inconsistencies, in docs
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Leif Middelschulte [Mon, 11 Jun 2018 17:31:28 +0000 (19:31 +0200)]
merge-submodule: reduce output verbosity
The output shall behave more similar to ordinary file merges' output to provide
a more consistent user experience.
Signed-off-by: Leif Middelschulte <Leif.Middelschulte@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 11 Jun 2018 08:35:45 +0000 (04:35 -0400)]
fsck: avoid looking at NULL blob->object
Commit
159e7b080b (fsck: detect gitmodules files,
2018-05-02) taught fsck to look at the content of
.gitmodules files. If the object turns out not to be a blob
at all, we just complain and punt on checking the content.
And since this was such an obvious and trivial code path, I
didn't even bother to add a test.
Except it _does_ do one non-trivial thing, which is call the
report() function, which wants us to pass a pointer to a
"struct object". Which we don't have (we have only a "struct
object_id"). So we erroneously pass a NULL object to
report(), which gets dereferenced and causes a segfault.
It seems like we could refactor report() to just take the
object_id itself. But we pass the object pointer along to
a callback function, and indeed this ends up in
builtin/fsck.c's objreport() which does want to look at
other parts of the object (like the type).
So instead, let's just use lookup_unknown_object() to get
the real "struct object", and pass that.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 11 Jun 2018 08:35:40 +0000 (04:35 -0400)]
t7415: don't bother creating commit for symlink test
Early versions of the fsck .gitmodules detection code
actually required a tree to be at the root of a commit for
it to be checked for .gitmodules. What we ended up with in
159e7b080b (fsck: detect gitmodules files, 2018-05-02),
though, finds a .gitmodules file in _any_ tree (see that
commit for more discussion).
As a result, there's no need to create a commit in our
tests. Let's drop it in the name of simplicity. And since
that was the only thing referencing $tree, we can pull our
tree creation out of a command substitution.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 11 Jun 2018 16:15:34 +0000 (09:15 -0700)]
RelNotes 2.18: typofixes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christopher Diaz Riveros [Sun, 10 Jun 2018 19:08:26 +0000 (14:08 -0500)]
l10n: es.po: Spanish update for v2.18.0 round 2
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Peter Krefting [Fri, 8 Jun 2018 21:53:44 +0000 (22:53 +0100)]
l10n: sv.po: Update Swedish translation (3608t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Peter Krefting [Fri, 1 Jun 2018 13:45:34 +0000 (14:45 +0100)]
l10n: sv.po: Update Swedish translation (3470t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Jiang Xin [Fri, 8 Jun 2018 01:17:29 +0000 (09:17 +0800)]
l10n: git.pot: v2.18.0 round 2 (144 new, 6 removed)
Generate po/git.pot from v2.18.0-rc1 for git v2.18.0 l10n round 2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Fri, 8 Jun 2018 01:01:56 +0000 (09:01 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
l10n: fr.po v2.18 round 1
l10n: vi(3470t): Updated Vietnamese translation for v2.18.0
l10n: es.po: Spanish update for v2.18.0 round 1
l10n: git.pot: v2.18.0 round 1 (108 new, 14 removed)
l10n: TEAMS: remove inactive de team members
l10n: de.po: fix typos
l10n: Update Catalan translation
Junio C Hamano [Mon, 4 Jun 2018 12:41:41 +0000 (21:41 +0900)]
Git 2.18-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 4 Jun 2018 12:39:50 +0000 (21:39 +0900)]
Merge branch 'bc/t3430-fixup'
Test fix.
* bc/t3430-fixup:
t3430: test clean-up
Junio C Hamano [Mon, 4 Jun 2018 12:39:50 +0000 (21:39 +0900)]
Merge branch 'bw/refspec-api'
Hotfix.
* bw/refspec-api:
refspec-api: avoid uninitialized field in refspec item
Junio C Hamano [Mon, 4 Jun 2018 12:39:49 +0000 (21:39 +0900)]
Merge branch 'tg/doc-sec-list'
Doc update.
* tg/doc-sec-list:
note git-security@googlegroups.com in more places
SubmittingPatches: replace numbered attributes with names
Junio C Hamano [Mon, 4 Jun 2018 12:39:49 +0000 (21:39 +0900)]
Merge branch 'rd/p4-doc-markup-env'
Doc markup update.
* rd/p4-doc-markup-env:
p4.txt: Use backquotes for variable names
Junio C Hamano [Mon, 4 Jun 2018 12:39:48 +0000 (21:39 +0900)]
Merge branch 'nd/remote-update-doc'
"git remote update" can take both a single remote nickname and a
nickname for remote groups, but only one of them was documented.
* nd/remote-update-doc:
remote: doc typofix
remote.txt: update documentation for 'update' command
Junio C Hamano [Mon, 4 Jun 2018 12:39:48 +0000 (21:39 +0900)]
Merge branch 'jt/submodule-pull-recurse-rebase'
"git pull -recurse-submodules --rebase", when the submodule
repository's history did not have anything common between ours and
the upstream's, failed to execute. We need to fetch from them to
continue even in such a case.
* jt/submodule-pull-recurse-rebase:
submodule: do not pass null OID to setup_revisions
Duy Nguyen [Wed, 30 May 2018 15:37:01 +0000 (17:37 +0200)]
remote: doc typofix
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Sun, 3 Jun 2018 14:32:50 +0000 (10:32 -0400)]
sha1-file.c: correct $GITDIR to $GIT_DIR in a comment
Fix single misspelling of $GITDIR to correct $GIT_DIR in a comment.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson [Fri, 1 Jun 2018 17:46:39 +0000 (17:46 +0000)]
t3430: test clean-up
Remove unnecessary test_tick etc...
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Sun, 3 Jun 2018 23:58:22 +0000 (07:58 +0800)]
Merge branch 'fr_2.18_round1' of git://github.com/jnavila/git
* 'fr_2.18_round1' of git://github.com/jnavila/git:
l10n: fr.po v2.18 round 1
Jean-Noël Avila [Sun, 3 Jun 2018 14:36:32 +0000 (16:36 +0200)]
l10n: fr.po v2.18 round 1
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Tran Ngoc Quan [Sun, 3 Jun 2018 06:43:13 +0000 (13:43 +0700)]
l10n: vi(3470t): Updated Vietnamese translation for v2.18.0
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Christopher Diaz Riveros [Fri, 1 Jun 2018 04:10:47 +0000 (23:10 -0500)]
l10n: es.po: Spanish update for v2.18.0 round 1
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Junio C Hamano [Fri, 1 Jun 2018 06:16:15 +0000 (15:16 +0900)]
A bit more topics before -rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 1 Jun 2018 06:15:35 +0000 (15:15 +0900)]
Merge branch 'bw/ref-prefix-for-configured-refspec'
* bw/ref-prefix-for-configured-refspec:
fetch: do not pass ref-prefixes for fetch by exact SHA1
Jonathan Nieder [Thu, 31 May 2018 07:23:39 +0000 (00:23 -0700)]
fetch: do not pass ref-prefixes for fetch by exact SHA1
When v2.18.0-rc0~10^2~1 (refspec: consolidate ref-prefix generation
logic, 2018-05-16) factored out the ref-prefix generation code for
reuse, it left out the 'if (!item->exact_sha1)' test in the original
ref-prefix generation code. As a result, fetches by SHA-1 generate
ref-prefixes as though the SHA-1 being fetched were an abbreviated ref
name:
$ GIT_TRACE_PACKET=1 bin-wrappers/git -c protocol.version=2 \
fetch origin
12039e008f9a4e3394f3f94f8ea897785cb09448
[...]
packet: fetch> ref-prefix
12039e008f9a4e3394f3f94f8ea897785cb09448
packet: fetch> ref-prefix refs/
12039e008f9a4e3394f3f94f8ea897785cb09448
packet: fetch> ref-prefix refs/tags/
12039e008f9a4e3394f3f94f8ea897785cb09448
packet: fetch> ref-prefix refs/heads/
12039e008f9a4e3394f3f94f8ea897785cb09448
packet: fetch> ref-prefix refs/remotes/
12039e008f9a4e3394f3f94f8ea897785cb09448
packet: fetch> ref-prefix refs/remotes/
12039e008f9a4e3394f3f94f8ea897785cb09448/HEAD
packet: fetch> 0000
If there is another ref name on the command line or the object being
fetched is already available locally, then that's mostly harmless.
But otherwise, we error out with
fatal: no matching remote head
since the server did not send any refs we are interested in. Filter
out the exact_sha1 refspecs to avoid this.
This patch adds a test to check this behavior that notices another
behavior difference between protocol v0 and v2 in the process. Add a
NEEDSWORK comment to clear it up.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 1 Jun 2018 06:06:41 +0000 (15:06 +0900)]
Merge branch 'cc/tests-without-assuming-ref-files-backend'
Quite a many tests assumed that newly created refs are made as
loose refs using the files backend, which have been updated to use
proper plumbing like rev-parse and update-ref, to avoid breakage
once we start using different ref backends.
* cc/tests-without-assuming-ref-files-backend:
t990X: use '.git/objects' as 'deep inside .git' path
t: make many tests depend less on the refs being files
Junio C Hamano [Fri, 1 Jun 2018 06:06:40 +0000 (15:06 +0900)]
Merge branch 'rd/init-typo'
Message fix.
* rd/init-typo:
init: fix grammar in "templates not found" msg
Junio C Hamano [Fri, 1 Jun 2018 06:06:40 +0000 (15:06 +0900)]
Merge branch 'js/rebase-recreate-merge'
Hotfixes.
* js/rebase-recreate-merge:
sequencer: ensure labels that are object IDs are rewritten
git-rebase--interactive: fix copy-paste mistake
Junio C Hamano [Fri, 1 Jun 2018 06:06:39 +0000 (15:06 +0900)]
Merge branch 'rd/tag-doc-lightweight'
Docfix.
* rd/tag-doc-lightweight:
tag: clarify in the doc that a tag can refer to a non-commit object
Junio C Hamano [Fri, 1 Jun 2018 06:06:39 +0000 (15:06 +0900)]
Merge branch 'rd/doc-options-placeholder'
Docfix.
* rd/doc-options-placeholder:
Use proper syntax for replaceables in command docs
Junio C Hamano [Fri, 1 Jun 2018 06:06:39 +0000 (15:06 +0900)]
Merge branch 'en/rev-parse-invalid-range'
"git rev-parse Y..." etc. misbehaved when given endpoints were
not committishes.
* en/rev-parse-invalid-range:
rev-parse: check lookup'ed commit references for NULL
Junio C Hamano [Fri, 1 Jun 2018 06:06:38 +0000 (15:06 +0900)]
Merge branch 'ld/p4-unshelve'
"git p4" learned to "unshelve" shelved commit from P4.
* ld/p4-unshelve:
git-p4: add unshelve command
Junio C Hamano [Fri, 1 Jun 2018 06:06:38 +0000 (15:06 +0900)]
Merge branch 'nd/use-opt-int-set-f'
Code simplification.
* nd/use-opt-int-set-f:
Use OPT_SET_INT_F() for cmdline option specification
Junio C Hamano [Fri, 1 Jun 2018 06:06:38 +0000 (15:06 +0900)]
Merge branch 'pa/import-tars-long-names'
The import-tars script (in contrib/) has been taught to handle
tarballs with overly long paths that use PAX extended headers.
* pa/import-tars-long-names:
import-tars: read overlong names from pax extended header
Junio C Hamano [Fri, 1 Jun 2018 06:06:37 +0000 (15:06 +0900)]
Merge branch 'nd/command-list'
The list of commands with their various attributes were spread
across a few places in the build procedure, but it now is getting a
bit more consolidated to allow more automation.
* nd/command-list:
completion: allow to customize the completable command list
completion: add and use --list-cmds=alias
completion: add and use --list-cmds=nohelpers
Move declaration for alias.c to alias.h
completion: reduce completable command list
completion: let git provide the completable command list
command-list.txt: documentation and guide line
help: use command-list.txt for the source of guides
help: add "-a --verbose" to list all commands with synopsis
git: support --list-cmds=list-<category>
completion: implement and use --list-cmds=main,others
git --list-cmds: collect command list in a string_list
git.c: convert --list-* to --list-cmds=*
Remove common-cmds.h
help: use command-list.h for common command list
generate-cmds.sh: export all commands to command-list.h
generate-cmds.sh: factor out synopsis extract code
Jeff King [Thu, 31 May 2018 22:45:31 +0000 (18:45 -0400)]
index-pack: handle --strict checks of non-repo packs
Commit
73c3f0f704 (index-pack: check .gitmodules files with
--strict, 2018-05-04) added a call to add_packed_git(), with
the intent that the newly-indexed objects would be available
to the process when we run fsck_finish(). But that's not
what add_packed_git() does. It only allocates the struct,
and you must install_packed_git() on the result. So that
call was effectively doing nothing (except leaking a
struct).
But wait, we passed all of the tests! Does that mean we
don't need the call at all?
For normal cases, no. When we run "index-pack --stdin"
inside a repository, we write the new pack into the object
directory. If fsck_finish() needs to access one of the new
objects, then our initial lookup will fail to find it, but
we'll follow up by running reprepare_packed_git() and
looking again. That logic was meant to handle somebody else
repacking simultaneously, but it ends up working for us
here.
But there is a case that does need this, that we were not
testing. You can run "git index-pack foo.pack" on any file,
even when it is not inside the object directory. Or you may
not even be in a repository at all! This case fails without
doing the proper install_packed_git() call.
We can make this work by adding the install call.
Note that we should be prepared to handle add_packed_git()
failing. We can just silently ignore this case, though. If
fsck_finish() later needs the objects and they're not
available, it will complain itself. And if it doesn't
(because we were able to resolve the whole fsck in the first
pass), then it actually isn't an interesting error at all.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 31 May 2018 22:42:53 +0000 (18:42 -0400)]
prepare_commit_graft: treat non-repository as a noop
The parse_commit_buffer() function consults lookup_commit_graft()
to see if we need to rewrite parents. The latter will look
at $GIT_DIR/info/grafts. If you're outside of a repository,
then this will trigger a BUG() as of
b1ef400eec (setup_git_env:
avoid blind fall-back to ".git", 2016-10-20).
It's probably uncommon to actually parse a commit outside of
a repository, but you can see it in action with:
cd /not/a/git/repo
git index-pack --strict /some/file.pack
This works fine without --strict, but the fsck checks will
try to parse any commits, triggering the BUG(). We can fix
that by teaching the graft code to behave as if there are no
grafts when we aren't in a repository.
Arguably index-pack (and fsck) are wrong to consider grafts
at all. So another solution is to disable grafts entirely
for those commands. But given that the graft feature is
deprecated anyway, it's not worth even thinking through the
ramifications that might have.
There is one other corner case I considered here. What
should:
cd /not/a/git/repo
export GIT_GRAFT_FILE=/file/with/grafts
git index-pack --strict /some/file.pack
do? We don't have a repository, but the user has pointed us
directly at a graft file, which we could respect. I believe
this case did work that way prior to
b1ef400eec. However,
fixing it now would be pretty invasive. Back then we would
just call into setup_git_env() even without a repository.
But these days it actually takes a git_dir argument. So
there would be a fair bit of refactoring of the setup code
involved.
Given the obscurity of this case, plus the fact that grafts
are deprecated and probably shouldn't work under index-pack
anyway, it's not worth pursuing further. This patch at least
un-breaks the common case where you're _not_ using grafts,
but we BUG() anyway trying to even find that out.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 1 Jun 2018 02:33:19 +0000 (11:33 +0900)]
refspec-api: avoid uninitialized field in refspec item
When parse_refspec() function was created at
3eec3700 ("refspec:
factor out parsing a single refspec", 2018-05-16) to take a caller
supplied piece of memory to fill parsed refspec_item, it forgot that
a refspec without colon must set item->dst to NULL to let the users
of refspec know that the result of the fetch does not get stored in
an ref on our side.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Wed, 30 May 2018 13:04:00 +0000 (09:04 -0400)]
p4.txt: Use backquotes for variable names
For consistency, use backquotes when referring to environment
variables, as is done in other man pages.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Duy Nguyen [Wed, 30 May 2018 15:37:01 +0000 (17:37 +0200)]
remote.txt: update documentation for 'update' command
Commit
b344e1614b (git remote update: Fallback to remote if group does
not exist - 2009-04-06) lets "git remote update" accept individual
remotes as well. Previously this command only accepted remote
groups. The commit updates the command syntax but not the actual
document of this subcommand. Update it.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren [Thu, 31 May 2018 03:24:14 +0000 (20:24 -0700)]
RelNotes: remove duplicate release note
In the 2.18 cycle, directory rename detection was merged, then reverted,
then reworked in such a way to fix another prominent bug in addition to
the original problem causing it to be reverted. When the reworked series
was merged, we ended up with two nearly duplicate release notes. Remove
the second copy, but preserve the information about the extra bug fix.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>