1
0
mirror of https://github.com/git/git.git synced 2024-09-27 05:11:36 +02:00
Commit Graph

51812 Commits

Author SHA1 Message Date
Beat Bolli
b6d3f5a960 string-list.c: avoid conversion from void * to function pointer
ISO C forbids the conversion of void pointers to function pointers.
Introduce a context struct that encapsulates the function pointer.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-09 14:37:50 -07:00
Beat Bolli
9ad36356dd sequencer.c: avoid empty statements at top level
The macro GIT_PATH_FUNC expands to a function definition that ends with
a closing brace. Remove two extra semicolons.

While at it, fix the example in path.h.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-09 14:37:03 -07:00
Beat Bolli
8302f50e8c convert.c: replace "\e" escapes with "\033".
The "\e" escape is not defined in ISO C.

While on this line, add a missing space after the comma.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-09 14:36:24 -07:00
Junio C Hamano
13f925f3e4 fixup! refs/refs-internal.h: avoid forward declaration of an enum 2018-07-09 14:36:12 -07:00
Beat Bolli
91c2f2040a refs/refs-internal.h: avoid forward declaration of an enum
Include iterator.h to define enum iterator_selection.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-09 14:35:52 -07:00
Junio C Hamano
ca5e39683a fixup! connect.h: avoid forward declaration of an enum 2018-07-09 14:35:39 -07:00
Beat Bolli
2e75c8ed85 connect.h: avoid forward declaration of an enum
Include protocol.h to define enum protocol_version.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-09 14:35:19 -07:00
Junio C Hamano
53f9a3e157 Git 2.18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-21 10:00:06 -07:00
Junio C Hamano
1fb9df7248 Merge branch 'en/rename-directory-detection-reboot'
* en/rename-directory-detection-reboot:
  merge-recursive: use xstrdup() instead of fixed buffer
2018-06-19 11:11:03 -07:00
Junio C Hamano
f0ac6e3943 Merge Korean translation for l10n of Git 2.18.0 round 3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbKFyNAAoJEMek6Rt1RHooUS0P/3zxiFjtSTlb0dfZ1VFaC3Zm
 vjowFQg4gUzBK37L1G5YD5sCJsdH/sOsfJlB1ZQ5sV2Ml2i8aJIMQYIrIQV9en3t
 Q+/zndp8i+2GdoL7VkPcoYv5kA/dvUaDn3GBohqkyXJy5oe7s6f1DuqXVCSgLBck
 9CSxbIp2lU7eS7Hm0bnV4RTTVmT0xiYT03CA/CPfIuQd59wPSR33o0zxCzrHjtJO
 ZMyDjbWWBTYFKN77KFAQOSSbhvqwcFbarjQCuN61STy+L6R5kXBgt58ZExHY41Gb
 JOmvqWmEHzKtJ0254fWGOyyIWetA7cjaxdYlE2M96p/etao6TIK1LeESLYRQBx2p
 dIGnUnNo2/7sBL4yIt4oq9BNAS+EOt+2uFM+tl+bKBhFvOGxqAMj4pgw1RtR/7kF
 9cFr+hrqliIUd3sBe4yVOaVmjnLK3vN76IYqFKlwtlE5Br8Jl/zz1PhWM+Z+91zm
 8GSqJTgY6ivtd2GSguVqkj5MNTgDOFNe2IOgAHmkXQEW27gkW+5aZ8GCWVAzwNX+
 YiMtNtuG1+TUGmEHM3kRYItUWpclhViNDwZTrqCJtdlBLwNMYXVHqHr+LkwxElhD
 ZSb4EPl4OHrvpEZmjCRTg5g9FWsZgFdUqwvApHLfb0ghYkcrRf1xGgISfiIeO1Xo
 DOpLbg7zcaVZywzVZ0xr
 =APV7
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.18.0-rnd3.1' of git://github.com/git-l10n/git-po

Merge Korean translation for l10n of Git 2.18.0 round 3

* tag 'l10n-2.18.0-rnd3.1' of git://github.com/git-l10n/git-po:
  l10n: ko.po: Update Korean translation
2018-06-19 09:29:23 -07:00
Junio C Hamano
bd73c3f13f Merge branch 'cf/submodule-progress-dissociate'
* cf/submodule-progress-dissociate:
  t7400: encapsulate setup code in test_expect_success
2018-06-19 09:26:59 -07:00
Junio C Hamano
6b55779afc Merge branch 'js/rebase-i-root-fix'
* js/rebase-i-root-fix:
  t3404: check root commit in 'rebase -i --root reword root commit'
2018-06-19 09:26:28 -07:00
Stefan Beller
83f5fa58e8 t7400: encapsulate setup code in test_expect_success
When running t7400 in a shell you observe more output than expected:

    ...
    ok 8 - setup - hide init subdirectory
    ok 9 - setup - repository to add submodules to
    ok 10 - submodule add
    [master (root-commit) d79ce16] one
     Author: A U Thor <author@example.com>
     1 file changed, 1 insertion(+)
     create mode 100644 one.t
    ok 11 - redirected submodule add does not show progress
    ok 12 - redirected submodule add --progress does show progress
    ok 13 - submodule add to .gitignored path fails
    ...

Fix the output by encapsulating the setup code in test_expect_success

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-19 09:25:56 -07:00
Todd Zullinger
878810552b t3404: check root commit in 'rebase -i --root reword root commit'
When testing a reworded root commit, ensure that the squash-onto commit
which is created and amended is still the root commit.

Suggested-by: Phillip Wood <phillip.wood@talktalk.net>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-19 09:14:33 -07:00
Karthikeyan Singaravelan
1f2abe68d0 doc: fix typos in documentation and release notes
Signed-off-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-19 09:01:12 -07:00
Junio C Hamano
242ba98e44 Almost 2.18 final
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-18 11:24:21 -07:00
Junio C Hamano
da34dd49bb Merge branch 'es/make-no-iconv'
"make NO_ICONV=NoThanks" did not override NEEDS_LIBICONV
(i.e. linkage of -lintl, -liconv, etc. that are platform-specific
tweaks), which has been corrected.

* es/make-no-iconv:
  Makefile: make NO_ICONV really mean "no iconv"
2018-06-18 11:23:24 -07:00
Junio C Hamano
cc2beafc4b Merge branch 'sg/t7406-chain-fix'
Test fix.

* sg/t7406-chain-fix:
  t7406-submodule-update: fix broken &&-chains
2018-06-18 11:23:24 -07:00
Junio C Hamano
4229478639 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
2018-06-18 11:23:23 -07:00
Junio C Hamano
f300f5681e 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
2018-06-18 11:23:22 -07:00
Junio C Hamano
f35f43f565 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
2018-06-18 11:23:22 -07:00
Junio C Hamano
1663e2ba68 l10n for Git 2.18.0 round 3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbJo13AAoJEMek6Rt1RHooQngQAIDuLczx9KUC03Ig5ekbVeyb
 c9l/6DA3D03b6vG++T+C/Ro/rCtbmVWamf2VRXkTjtTk9zMo2oSoVxw3vWoIveQq
 AZ8dcT2js3otY0XUnIznsf0sVWGIN19lxvnwGspVm/1M3uu4/dVBOs84rbEvPPqi
 NtwwmBvFFMSfc7H/EIP4NzMNDWFbMNd2eJwu6rvasIP8RLnk2WaMToibfI9JNV0F
 XDcb3xpIMu3UEePzjOzdG7562pr7SAxOi3TEIP6ToRqo1HRFVIXJspIdOHlc9Lm+
 i1hV8iKnptj9GF/VyKBYdyzHHlQPUiZ+diZiZd5se6DlaE7Cpl4Cx7F1MPq07u0B
 +RKFfHzHguLljUgwEVO4LiZt/U+fWcGu++BkwzIPmTpolxqdaoW8oArBn5KPMY2k
 L3mE2M4ck71VytTrdG+rcQ/jzC9n2fb+65u9J908QV0KL797XGxlzd4E7vPmklaB
 9Ed0yRzndJgMe/aOv1J9RtG7ITpGnxffT1B73R0aOmrPuyu77cJnHY7q6clAqBOH
 vYH0/2VHTRT1qRhUZQTtCC2iYbDAu+ZMW1D6/oG3eC6cMqw2UFMM8yu1WRR1RI/N
 EZl5jLZqyVOulxDoo6f5ZXAohxbQjrBrxE6UOMnsC6Xi+nhng182snfXcahZA7O6
 DD7yY8hJPVIKQiMjXqqy
 =iiA9
 -----END PGP SIGNATURE-----

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
2018-06-18 10:21:24 -07:00
Junio C Hamano
1022379886 A bunch of micro-fixes before going 2.18 final
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-18 10:20:42 -07:00
Changwoo Ryu
4898dd2513 l10n: ko.po: Update Korean translation
Update the Korean translation and change the team leader to Gwan-gyeong
Mun.

Signed-off-by: Gwan-gyeong Mun <elongbug@gmail.com>
Signed-off-by: Changwoo Ryu <cwryu@debian.org>
Reviewed-by: Gwan-gyeong Mun <elongbug@gmail.com>
2018-06-19 02:19:42 +09:00
Junio C Hamano
698eb031bb Merge branch 'sb/blame-color'
Leakfix.

* sb/blame-color:
  blame: release string_list after use in parse_color_fields()
2018-06-18 10:18:45 -07:00
Junio C Hamano
23fc55a90c 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`
2018-06-18 10:18:45 -07:00
Junio C Hamano
f72432d64e 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
2018-06-18 10:18:44 -07:00
Junio C Hamano
929c097548 Merge branch 'rd/doc-remote-tracking-with-hyphen'
Doc update.

* rd/doc-remote-tracking-with-hyphen:
  Use hyphenated "remote-tracking branch" (docs and comments)
2018-06-18 10:18:43 -07:00
Junio C Hamano
faff81287b 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
2018-06-18 10:18:43 -07:00
Junio C Hamano
094381ed79 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"
2018-06-18 10:18:42 -07:00
Junio C Hamano
a626082629 Merge branch 'km/doc-workflows-typofix'
Typofix.

* km/doc-workflows-typofix:
  gitworkflows: fix grammar in 'Merge upwards' rule
2018-06-18 10:18:42 -07:00
Junio C Hamano
e638899470 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
2018-06-18 10:18:41 -07:00
Junio C Hamano
d676cc512a Merge branch 'rd/diff-options-typofix'
Typofix.

* rd/diff-options-typofix:
  diff-options.txt: fix minor typos, font inconsistencies, in docs
2018-06-18 10:18:41 -07:00
Junio C Hamano
1bd0e6779a 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
2018-06-18 10:18:40 -07:00
René Scharfe
94eff2b69a 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>
2018-06-18 10:03:38 -07:00
SZEDER Gábor
2e157d134c 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>
2018-06-18 09:50:56 -07:00
SZEDER Gábor
8de19d6be8 t7406-submodule-update: fix broken &&-chains
Three tests in 't7406-submodule-update' contain broken &&-chains, but
since they are all in subshells, chain-lint couldn't notice them.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-18 09:48:10 -07:00
Johannes Schindelin
76fda6ebbc 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>
2018-06-18 09:36:58 -07:00
Todd Zullinger
3a36ca0881 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>
2018-06-18 09:22:18 -07:00
Jeff King
1140bf01ec 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>
2018-06-18 09:13:57 -07:00
Jeff King
9d2e330b17 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>
2018-06-18 09:13:57 -07:00
Kaartic Sivaraam
cf317877e3 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>
2018-06-18 08:54:40 -07:00
Jiang Xin
fd8cb37902 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>
2018-06-18 00:31:45 +08:00
Jiang Xin
6484659f26 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)
2018-06-17 22:44:08 +08:00
Jiang Xin
cc9ab5bdfc 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
2018-06-17 22:41:43 +08:00
Jiang Xin
1f764f054c 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)
2018-06-17 22:37:53 +08:00
Jiang Xin
ee4286e8a3 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
2018-06-17 22:36:41 +08:00
Alexander Shopov
e530425bc1 l10n: bg.po: Updated Bulgarian translation (3608t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2018-06-17 13:16:40 +02:00
Tran Ngoc Quan
09dba1409d l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round 3
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2018-06-17 07:06:44 +07:00
Jean-Noël Avila
3509754cae l10n: fr.po v2.18.0 round 3
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2018-06-16 20:43:07 +02:00