summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* interpret-trailers: honor the cut linebm/interpret-trailers-cut-line-is-eomBrian Malehorn2017-05-185-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a commit message is edited with the "verbose" option, the buffer will have a cut line and diff after the log message, like so: my subject # ------------------------ >8 ------------------------ # Do not touch the line above. # Everything below will be removed. diff --git a/foo.txt b/foo.txt index 5716ca5..7601807 100644 --- a/foo.txt +++ b/foo.txt @@ -1 +1 @@ -bar +baz "git interpret-trailers" is unaware of the cut line, and assumes the trailer block would be at the end of the whole thing. This can easily be seen with: $ GIT_EDITOR='git interpret-trailers --in-place --trailer Acked-by:me' \ git commit --amend -v Teach "git interpret-trailers" to notice the cut-line and ignore the remainder of the input when looking for a place to add new trailer block. This makes it consistent with how "git commit -v -s" inserts a new Signed-off-by: line. This can be done by the same logic as the existing helper function, wt_status_truncate_message_at_cut_line(), uses, but it wants the caller to pass a strbuf to it. Because the function ignore_non_trailer() used by the command takes a <pointer, length> pair, not a strbuf, steal the logic from wt_status_truncate_message_at_cut_line() to create a new wt_status_locate_end() helper function that takes <pointer, length> pair, and make ignore_non_trailer() call it to help "interpret-trailers". Since there is only one caller of wt_status_truncate_message_at_cut_line() in cmd_commit(), rewrite it to call wt_status_locate_end() helper instead and remove the old helper that no longer has any caller. Signed-off-by: Brian Malehorn <bmalehorn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 2.13v2.13.0Junio C Hamano2017-05-093-1/+14
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-poJunio C Hamano2017-05-099-19174/+23732
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l10n for Git 2.13.0 round 2.1 * tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po: l10n: zh_CN: for git v2.13.0 l10n round 2 l10n: sv.po: Update Swedish translation (3195t0f0u) l10n: zh_CN: review for git v2.13.0 l10n round 1 l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (3195t) l10n: fr.po v2.13 rnd 2 l10n: de.po: translate 4 new messages l10n: de.po: update German translation l10n: de.po: lower case after semi-colon l10n: vi.po(3195t): Update translation for v2.13.0 round 2 l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed) l10n: zh_CN: for git v2.13.0 l10n round 1 l10n: fr.po v2.13 round 1 l10n: pt_PT: update Portuguese translation l10n: bg.po: Updated Bulgarian translation (3201t) l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0 l10n: sv.po: Update Swedish translation (3199t0f0u) l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)
| * Merge branch 'master' of git://github.com/nafmo/git-l10n-svJiang Xin2017-05-091-434/+439
| |\ | | | | | | | | | | | | * 'master' of git://github.com/nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (3195t0f0u)
| | * l10n: sv.po: Update Swedish translation (3195t0f0u)Peter Krefting2017-05-091-434/+439
| | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | l10n: zh_CN: for git v2.13.0 l10n round 2Jiang Xin2017-05-091-429/+436
| |/ | | | | | | | | | | Translate 4 messages (3195t0f0u) for git v2.13.0-rc2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * l10n: zh_CN: review for git v2.13.0 l10n round 1Ray Chen2017-05-091-17/+17
| | | | | | | | Signed-off-by: Ray Chen <oldsharp@gmail.com>
| * Merge branch 'master' of https://github.com/vnwildman/gitJiang Xin2017-05-091-431/+438
| |\ | | | | | | | | | | | | * 'master' of https://github.com/vnwildman/git: l10n: vi.po(3195t): Update translation for v2.13.0 round 2
| | * l10n: vi.po(3195t): Update translation for v2.13.0 round 2Tran Ngoc Quan2017-05-051-431/+438
| | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * | l10n: Update Catalan translationJordi Mas2017-05-091-2126/+2491
| | | | | | | | | | | | Signed-off-by: Jordi Mas <jmas@softcatala.org>
| * | l10n: bg.po: Updated Bulgarian translation (3195t)Alexander Shopov2017-05-091-85/+61
| | | | | | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * | Merge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/gitJiang Xin2017-05-091-448/+478
| |\ \ | | | | | | | | | | | | | | | | * 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git: l10n: fr.po v2.13 rnd 2
| | * | l10n: fr.po v2.13 rnd 2Jean-Noel Avila2017-05-061-448/+478
| | |/ | | | | | | | | | Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
| * | l10n: de.po: translate 4 new messagesRalf Thielow2017-05-051-440/+465
| | | | | | | | | | | | | | | | | | | | | | | | Translate 4 new messages came from git.pot update in 28e1aaa48 (l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
| * | l10n: de.po: update German translationRalf Thielow2017-05-051-1989/+2381
| | | | | | | | | | | | | | | | | | | | | | | | Translate 96 new messages came from git.pot update in dfc182b (l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
| * | l10n: de.po: lower case after semi-colonMichael J Gruber2017-05-051-1/+1
| |/ | | | | | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)Jiang Xin2017-05-051-428/+417
| | | | | | | | | | | | Generate po/git.pot from v2.13.0-rc2 for git v2.13.0 l10n round 2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * Merge branch 'master' of git://github.com/git-l10n/git-poJiang Xin2017-05-057-14167/+17929
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://github.com/git-l10n/git-po: l10n: zh_CN: for git v2.13.0 l10n round 1 l10n: fr.po v2.13 round 1 l10n: pt_PT: update Portuguese translation l10n: bg.po: Updated Bulgarian translation (3201t) l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0 l10n: sv.po: Update Swedish translation (3199t0f0u) l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)
| | * l10n: zh_CN: for git v2.13.0 l10n round 1Jiang Xin2017-05-051-1947/+2303
| | | | | | | | | | | | | | | | | | | | | Translate 96 messages (3198t0f0u) for git v2.13.0-rc0. Reviewed-by: 依云 <lilydjwg@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| | * Merge branch 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/gitJiang Xin2017-05-051-1943/+2285
| | |\ | | | | | | | | | | | | | | | | * 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git: l10n: fr.po v2.13 round 1
| | | * l10n: fr.po v2.13 round 1Jean-Noel Avila2017-05-021-1943/+2285
| | | | | | | | | | | | | | | | Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
| | * | l10n: pt_PT: update Portuguese translationVasco Almeida2017-05-011-2057/+2471
| | | | | | | | | | | | | | | | Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
| | * | l10n: bg.po: Updated Bulgarian translation (3201t)Alexander Shopov2017-04-301-2423/+4086
| | | | | | | | | | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| | * | Merge branch 'master' of https://github.com/vnwildman/gitJiang Xin2017-04-291-1946/+2299
| | |\ \ | | | | | | | | | | | | | | | | | | | | * 'master' of https://github.com/vnwildman/git: l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
| | | * | l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0Tran Ngoc Quan2017-04-251-1946/+2299
| | | |/ | | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| | * | l10n: sv.po: Update Swedish translation (3199t0f0u)Peter Krefting2017-04-231-1938/+2294
| | |/ | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| | * l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)Jiang Xin2017-04-231-1913/+2191
| | | | | | | | | | | | | | | | | | Generate po/git.pot from v2.13.0-rc0 for git v2.13.0 l10n round 1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
* | | Sync with v2.12.3Junio C Hamano2017-05-0811-11/+116
|\ \ \ | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Git 2.12.3v2.12.3Junio C Hamano2017-05-053-4/+12
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'maint-2.11' into maintJunio C Hamano2017-05-0510-8/+105
| |\ \ \
| | * | | Git 2.11.2v2.11.2Junio C Hamano2017-05-054-3/+16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | | Merge branch 'maint-2.10' into maint-2.11Junio C Hamano2017-05-059-8/+92
| | |\ \ \
| | | * | | Git 2.10.3v2.10.3Junio C Hamano2017-05-053-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | * | | Merge branch 'maint-2.9' into maint-2.10Junio C Hamano2017-05-058-7/+83
| | | |\ \ \
| | | | * | | Git 2.9.4v2.9.4Junio C Hamano2017-05-053-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | * | | Merge branch 'maint-2.8' into maint-2.9Junio C Hamano2017-05-057-6/+74
| | | | |\ \ \
| | | | | * | | Git 2.8.5v2.8.5Junio C Hamano2017-05-054-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | * | | Merge branch 'maint-2.7' into maint-2.8Junio C Hamano2017-05-056-5/+60
| | | | | |\ \ \
| | | | | | * | | Git 2.7.5v2.7.5Junio C Hamano2017-05-054-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | * | | Merge branch 'maint-2.6' into maint-2.7Junio C Hamano2017-05-055-4/+43
| | | | | | |\ \ \
| | | | | | | * | | Git 2.6.7v2.6.7maint-2.6Junio C Hamano2017-05-054-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | * | | Merge branch 'maint-2.5' into maint-2.6Junio C Hamano2017-05-054-3/+29
| | | | | | | |\ \ \
| | | | | | | | * | | Git 2.5.6v2.5.6maint-2.5Junio C Hamano2017-05-054-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | | * | | Merge branch 'maint-2.4' into maint-2.5Junio C Hamano2017-05-053-2/+15
| | | | | | | | |\ \ \
| | | | | | | | | * | | Git 2.4.12v2.4.12maint-2.4Junio C Hamano2017-05-054-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | | | * | | Merge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4Junio C Hamano2017-05-051-1/+1
| | | | | | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/shell-no-repository-that-begins-with-dash: shell: disallow repo names beginning with dash
| | | | | | | | | | * | | shell: disallow repo names beginning with dashjk/shell-no-repository-that-begins-with-dashJeff King2017-05-051-1/+1
| | | | | | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a remote server uses git-shell, the client side will connect to it like: ssh server "git-upload-pack 'foo.git'" and we literally exec ("git-upload-pack", "foo.git"). In early versions of upload-pack and receive-pack, we took a repository argument and nothing else. But over time they learned to accept dashed options. If the user passes a repository name that starts with a dash, the results are confusing at best (we complain of a bogus option instead of a non-existent repository) and malicious at worst (the user can start an interactive pager via "--help"). We could pass "--" to the sub-process to make sure the user's argument is interpreted as a branch name. I.e.: git-upload-pack -- -foo.git But adding "--" automatically would make us inconsistent with a normal shell (i.e., when git-shell is not in use), where "-foo.git" would still be an error. For that case, the client would have to specify the "--", but they can't do so reliably, as existing versions of git-shell do not allow more than a single argument. The simplest thing is to simply disallow "-" at the start of the repo name argument. This hasn't worked either with or without git-shell since version 1.0.0, and nobody has complained. Note that this patch just applies to do_generic_cmd(), which runs upload-pack, receive-pack, and upload-archive. There are two other types of commands that git-shell runs: - do_cvs_cmd(), but this already restricts the argument to be the literal string "server" - admin-provided commands in the git-shell-commands directory. We'll pass along arbitrary arguments there, so these commands could have similar problems. But these commands might actually understand dashed arguments, so we cannot just block them here. It's up to the writer of the commands to make sure they are safe. With great power comes great responsibility. Reported-by: Timo Schmid <tschmid@ernw.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'jh/verify-index-checksum-only-in-fsck'Junio C Hamano2017-05-091-8/+26
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jh/verify-index-checksum-only-in-fsck: t1450: avoid use of "sed" on the index, which is a binary file
| * | | | | | | | | | | t1450: avoid use of "sed" on the index, which is a binary filejh/verify-index-checksum-only-in-fsckJeff Hostetler2017-04-271-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous step added a path zzzzzzzz to the index, and then used "sed" to replace this string to yyyyyyyy to create a test case where the checksum at the end of the file does not match the contents. Unfortunately, use of "sed" on a non-text file is not portable. Instead, use a Perl script that seeks to the end and modifies the last byte of the file (where we _know_ stores the trailing checksum). Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Git 2.13-rc2v2.13.0-rc2Junio C Hamano2017-05-042-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>