summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-13t8003: factor setup out of coalesce testLibravatar Jeff King1-6/+10
In preparation for adding more tests of blame's coalesce code, let's split the setup out from the first test, and give each of the commits a more meaningful name: - $orig for the original source that added the lines - $split for the version where they are split apart - $final for the final version that re-joins them That's not strictly necessary, but makes the follow-on tests less brittle than relying on HEAD^, etc, to name the commits. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13t8003: check output of coalesced blameLibravatar Jeff King1-7/+4
Commit f0cbe742f4 (blame: add a test to cover blame_coalesce(), 2019-06-20) added a test case where blame can usefully coalesce two groups of lines. But since it relies on the normal blame output, it only exercises the code and can't tell whether the lines were actually joined into a single group. However, by using --porcelain output, we can see how git-blame considers the groupings (and likewise how the coalescing might have a real user-visible impact for a tool that uses the porcelain-output groupings). This lets us confirm that we are indeed coalescing correctly (and the fact that this test case requires coalescing can be verified by dropping the call to blame_coalesce(), causing the test to fail). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-26Git 2.28Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-26Merge tag 'l10n-2.28.0-rnd1' of https://www.github.com/git-l10n/git-po into ↵Libravatar Junio C Hamano11-11813/+14504
master l10n-2.28.0-rnd1 * tag 'l10n-2.28.0-rnd1' of https://www.github.com/git-l10n/git-po: l10n: es: 2.28.0 round 1 l10n: de.po: Update German translation for Git v2.28.0 l10n: de.po: fix grammar l10n: zh_CN: for git v2.28.0 l10n round 1 l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated) l10n: vi.po: correct "ident line" translation l10n: vi.po(4931t): Updated translation for v2.28.0 l10n: fr v2.28.0 round 1 l10n: sv.po: Update Swedish translation (4931t0f0u) l10n: it.po: update the Italian translation for Git 2.28.0 round 1 l10n: tr: v2.28.0 round 1 l10n: git.pot: v2.28.0 round 1 (70 new, 14 removed) l10n: Update Catalan translation
2020-07-27Merge branch 'master' of github.com:Softcatala/git-poLibravatar Jiang Xin1-426/+428
* 'master' of github.com:Softcatala/git-po: l10n: Update Catalan translation
2020-07-26l10n: es: 2.28.0 round 1Libravatar Christopher Diaz Riveros1-1219/+1509
Signed-off-by: Christopher Diaz Riveros <christopher.diaz.riv@gmail.com>
2020-07-24Merge branch 'ps/ref-transaction-hook' into masterLibravatar Junio C Hamano1-2/+2
A new hook. * ps/ref-transaction-hook: githooks.txt: use correct "reference-transaction" hook name
2020-07-24githooks.txt: use correct "reference-transaction" hook nameLibravatar Bojun Chen1-2/+2
The "reference transaction" hook was introduced in commit 6754159767 (refs: implement reference transaction hook, 2020-06-19). The name of the hook is declared as "reference-transaction" in "refs.c" and testcases, but the name declared in "githooks.txt" is different. Signed-off-by: Bojun Chen <bojun.cbj@alibaba-inc.com> Reviewed-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-24l10n: de.po: Update German translation for Git v2.28.0Libravatar Matthias Rüster1-1160/+1420
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2020-07-24l10n: de.po: fix grammarLibravatar Ralf Thielow1-3/+3
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2020-07-22Documentation/RelNotes: fix a typo in 2.28's relnotesLibravatar Taylor Blau1-1/+1
Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-22Git 2.28-rc2Libravatar Junio C Hamano2-1/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-21Merge branch 'en/sparse-status' into masterLibravatar Junio C Hamano1-2/+2
Fix to a "git prompt" regression during this development cycle. * en/sparse-status: git-prompt: change == to = for zsh's sake
2020-07-21l10n: zh_CN: for git v2.28.0 l10n round 1Libravatar Jiang Xin1-1122/+1368
Translate 70 new messages (4931t0f0u) for git 2.28.0. Reviewed-by: Fangyi Zhou <me@fangyi.io> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2020-07-21Merge branch 'l10n/zh_TW/200716' of github.com:l10n-tw/git-poLibravatar Jiang Xin1-1127/+1413
* 'l10n/zh_TW/200716' of github.com:l10n-tw/git-po: l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated)
2020-07-20git-prompt: change == to = for zsh's sakeLibravatar David J. Malan1-2/+2
When using git-prompt.sh with zsh, __git_ps1 currently errs when inside a repo with: __git_ps1:96: = not found Avoid using non-portable "==" that is only understood by bash and not zsh. Change to "=" so that the prompt script becomes usable with zsh again. Signed-off-by: David J. Malan <malan@harvard.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-20Merge https://github.com/prati0100/git-gui into masterLibravatar Junio C Hamano1-24/+3
* https://github.com/prati0100/git-gui: git-gui: allow opening work trees from the startup dialog
2020-07-20l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated)Libravatar Yi-Jyun Pan1-1127/+1413
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2020-07-20l10n: vi.po: correct "ident line" translationLibravatar Đoàn Trần Công Danh1-6/+6
While we're at it, fix some minor misspelling and improve translation for 3-way-merging. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2020-07-20l10n: vi.po(4931t): Updated translation for v2.28.0Libravatar Tran Ngoc Quan1-1125/+1411
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2020-07-18Merge branch 'dl/branch-cleanup' into masterLibravatar Junio C Hamano1-2/+2
Last minute fix-up to tests for portability. * dl/branch-cleanup: t3200: don't grep for `strerror()` string
2020-07-18Merge branch 'js/pu-to-seen' into masterLibravatar Junio C Hamano1-1/+1
Last minute fix-up to documentation. * js/pu-to-seen: gitworkflows.txt: fix broken subsection underline
2020-07-18Merge branch 'jc/relnotes-v0-extension-update' into masterLibravatar Junio C Hamano1-9/+0
Last minute fix-up to the release notes. * jc/relnotes-v0-extension-update: RelNotes: update the v0 with extension situation
2020-07-18t3200: don't grep for `strerror()` stringLibravatar Martin Ågren1-2/+2
In 6b7093064a ("t3200: test for specific errors", 2020-06-15), we learned to grep stderr to ensure that the failing `git branch` invocations fail for the right reason. In two of these tests, we grep for "File exists", expecting the string to show up there since config.c calls `error_errno()`, which ends up including `strerror(errno)` in the error message. But as we saw in 4605a73073 ("t1091: don't grep for `strerror()` string", 2020-03-08), there exists at least one implementation where `strerror()` yields a slightly different string than the one we're grepping for. In particular, these tests fail on the NonStop platform. Similar to 4605a73073, grep for the beginning of the string instead to avoid relying on `strerror()` behavior. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-18gitworkflows.txt: fix broken subsection underlineLibravatar Martin Ågren1-1/+1
AsciiDoctor renders the "~~~~~~~~~" literally. That's not our intention: it is supposed to indicate a level 2 subsection. In 828197de8f ("docs: adjust for the recent rename of `pu` to `seen`", 2020-06-25), the length of this section header grew by two characters but we didn't adjust the number of ~ characters accordingly. AsciiDoc handles this discrepancy ok and still picks this up as a subsection title, but Asciidoctor is not as forgiving. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-17RelNotes: update the v0 with extension situationLibravatar Junio C Hamano1-9/+0
With the two-patch series for regression fix, to the users from 2.27 days, there is no visible behaviour change---we do not warn and fail use of v0 repositories with newer extensions yet, so there is nothing to note in the backward compatibility section. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-16Git 2.28-rc1Libravatar Junio C Hamano2-1/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-16Merge branch 'jn/v0-with-extensions-fix' into masterLibravatar Junio C Hamano3-17/+23
In 2.28-rc0, we corrected a bug that some repository extensions are honored by mistake even in a version 0 repositories (these configuration variables in extensions.* namespace were supposed to have special meaning in repositories whose version numbers are 1 or higher), but this was a bit too big a change. * jn/v0-with-extensions-fix: repository: allow repository format upgrade with extensions Revert "check_repository_format_gently(): refuse extensions for old repositories"
2020-07-16repository: allow repository format upgrade with extensionsLibravatar Jonathan Nieder3-8/+9
Now that we officially permit repository extensions in repository format v0, permit upgrading a repository with extensions from v0 to v1 as well. For example, this means a repository where the user has set "extensions.preciousObjects" can use "git fetch --filter=blob:none origin" to upgrade the repository to use v1 and the partial clone extension. To avoid mistakes, continue to forbid repository format upgrades in v0 repositories with an unrecognized extension. This way, a v0 user using a misspelled extension field gets a chance to correct the mistake before updating to the less forgiving v1 format. While we're here, make the error message for failure to upgrade the repository format a bit shorter, and present it as an error, not a warning. Reported-by: Huan Huan Chen <huanhuanchen@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-16Revert "check_repository_format_gently(): refuse extensions for old ↵Libravatar Jonathan Nieder2-11/+16
repositories" This reverts commit 14c7fa269e42df4133edd9ae7763b678ed6594cd. The core.repositoryFormatVersion field was introduced in ab9cb76f661 (Repository format version check., 2005-11-25), providing a welcome bit of forward compatibility, thanks to some welcome analysis by Martin Atukunda. The semantics are simple: a repository with core.repositoryFormatVersion set to 0 should be comprehensible by all Git implementations in active use; and Git implementations should error out early instead of trying to act on Git repositories with higher core.repositoryFormatVersion values representing new formats that they do not understand. A new repository format did not need to be defined until 00a09d57eb8 (introduce "extensions" form of core.repositoryformatversion, 2015-06-23). This provided a finer-grained extension mechanism for Git repositories. In a repository with core.repositoryFormatVersion set to 1, Git implementations can act on "extensions.*" settings that modify how a repository is interpreted. In repository format version 1, unrecognized extensions settings cause Git to error out. What happens if a user sets an extension setting but forgets to increase the repository format version to 1? The extension settings were still recognized in that case; worse, unrecognized extensions settings do *not* cause Git to error out. So combining repository format version 0 with extensions settings produces in some sense the worst of both worlds. To improve that situation, since 14c7fa269e4 (check_repository_format_gently(): refuse extensions for old repositories, 2020-06-05) Git instead ignores extensions in v0 mode. This way, v0 repositories get the historical (pre-2015) behavior and maintain compatibility with Git implementations that do not know about the v1 format. Unfortunately, users had been using this sort of configuration and this behavior change came to many as a surprise: - users of "git config --worktree" that had followed its advice to enable extensions.worktreeConfig (without also increasing the repository format version) would find their worktree configuration no longer taking effect - tools such as copybara[*] that had set extensions.partialClone in existing repositories (without also increasing the repository format version) would find that setting no longer taking effect The behavior introduced in 14c7fa269e4 might be a good behavior if we were traveling back in time to 2015, but we're far too late. For some reason I thought that it was what had been originally implemented and that it had regressed. Apologies for not doing my research when 14c7fa269e4 was under development. Let's return to the behavior we've had since 2015: always act on extensions.* settings, regardless of repository format version. While we're here, include some tests to describe the effect on the "upgrade repository version" code path. [*] https://github.com/google/copybara/commit/ca76c0b1e13c4e36448d12c2aba4a5d9d98fb6e7 Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-15Hopefully the last batch before -rc1Libravatar Junio C Hamano1-0/+8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-15Merge branch 'tb/commit-graph-no-check-oids' into masterLibravatar Junio C Hamano1-3/+1
Fix to the code to produce progress bar, which is new in the upcoming release. * tb/commit-graph-no-check-oids: commit-graph: fix "Collecting commits from input" progress line
2020-07-15Merge branch 'ct/diff-with-merge-base-clarification' into masterLibravatar Junio C Hamano1-7/+8
Doc update. * ct/diff-with-merge-base-clarification: git-diff.txt: reorder possible usages git-diff.txt: don't mark required argument as optional
2020-07-15Merge branch 'sg/commit-graph-progress-fix' into masterLibravatar Junio C Hamano1-22/+5
The code to produce progress output from "git commit-graph --write" had a few breakages, which have been fixed. * sg/commit-graph-progress-fix: commit-graph: fix "Writing out commit graph" progress counter commit-graph: fix progress of reachable commits
2020-07-15Merge branch 'ta/wait-on-aliased-commands-upon-signal' into masterLibravatar Junio C Hamano3-1/+5
When an aliased command, whose output is piped to a pager by git, gets killed by a signal, the pager got into a funny state, which has been corrected (again). * ta/wait-on-aliased-commands-upon-signal: Wait for child on signal death for aliases to externals Wait for child on signal death for aliases to builtins
2020-07-15commit-graph: fix "Collecting commits from input" progress lineLibravatar SZEDER Gábor1-3/+1
To display a progress line while reading commits from standard input and looking them up, 5b6653e523 (builtin/commit-graph.c: dereference tags in builtin, 2020-05-13) should have added a pair of start_delayed_progress() and stop_progress() calls around the loop reading stdin. Alas, the stop_progress() call ended up at the wrong place, after write_commit_graph(), which does all the commit-graph computation and writing, and has several progress lines of its own. Consequently, that new Collecting commits from input: 1234 progress line is overwritten by the first progress line shown by write_commit_graph(), and its final "done" line is shown last, after everything is finished: $ { sleep 3 ; git rev-list -3 HEAD ; sleep 1 ; } | ~/src/git/git commit-graph write --stdin-commits Expanding reachable commits in commit graph: 873402, done. Writing out commit graph in 4 passes: 100% (3493608/3493608), done. Collecting commits from input: 3, done. Furthermore, that stop_progress() call was added after the 'cleanup' label, where that loop reading stdin jumps in case of an error. In case of invalid input this then results in the "done" line shown after the error message: $ { sleep 3 ; git rev-list -3 HEAD ; echo junk ; } | ~/src/git/git commit-graph write --stdin-commits error: unexpected non-hex object ID: junk Collecting commits from input: 3, done. Move that stop_progress() call to the right place. While at it, drop the unnecessary 'if (progress)' condition protecting the stop_progress() call, because that function is prepared to handle a NULL progress struct. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-13git-diff.txt: reorder possible usagesLibravatar Martin Ågren1-6/+7
The description of `git diff` goes through several different invocations (numbering added by me): 1. git diff [<options>] [--] [<path>...] 2. git diff [<options>] --no-index [--] <path> <path> 3. git diff [<options>] --cached [<commit>] [--] [<path>...] 4. git diff [<options>] <commit> [--] [<path>...] 5. git diff [<options>] <commit> <commit> [--] [<path>...] 6. git diff [<options>] <commit>..<commit> [--] [<path>...] 7. git diff [<options>] <commit> <commit>... <commit> [--] [<path>...] 8. git diff [<options>] <commit>...<commit> [--] [<path>...] It then goes on to say that "all of the <commit> in the above description, except in the last two forms that use '..' notations, can be any <tree>". The "last two" actually refers to 6 and 8. This got out of sync in commit b7e10b2ca2 ("Documentation: usage for diff combined commits", 2020-06-12) which added item 7 to the mix. As a further complication, after b7e10b2ca2 we also have some potential confusion around "the '..' notation". The "..[.]" in items 6 and 8 are part of the rev notation, whereas the "..." in item 7 is manpage language for "one or more". Move item 6 down, i.e., to between 7 and 8, to restore the ordering. Because 6 refers to 5 ("synonymous to the previous form") we need to tweak the language a bit. An added bonus of this commit is that we're trying to steer users away from `git diff <commit>..<commit>` and moving it further down probably doesn't hurt. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-13git-diff.txt: don't mark required argument as optionalLibravatar Martin Ågren1-1/+1
Commit b7e10b2ca2 ("Documentation: usage for diff combined commits", 2020-06-12) modified the synopsis by adding an optional "[<commit>...]" to 'git diff' [<options>] <commit> <commit> [--] [<path>...] to effectively add 'git diff' [<options>] <commit> <commit>... <commit> [--] [<path>...] as another valid invocation. Which makes sense. Further down, in the description, it left the existing entry for 'git diff' [<options>] <commit> <commit> [--] [<path>...] intact and added a new entry on 'git diff' [<options>] <commit> [<commit>...] <commit> [--] [<path>...] where it says that "[t]his form is to view the results of a merge commit" and details how "the first listed commit must be the merge itself". But one possible instantiation of this form is `git diff <commit> <commit>` for which the added text doesn't really apply. Remove the brackets so that we lose this overlap between the two descriptions. We can still use the more compact representation in the synopsis. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-13Merge branch 'fr_v2.28.0_rnd1' of github.com:jnavila/gitLibravatar Jiang Xin1-1144/+1408
* 'fr_v2.28.0_rnd1' of github.com:jnavila/git: l10n: fr v2.28.0 round 1
2020-07-12l10n: fr v2.28.0 round 1Libravatar Jean-Noël Avila1-1144/+1408
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2020-07-12Merge branch 'master' of github.com:nafmo/git-l10n-svLibravatar Jiang Xin1-1127/+1399
* 'master' of github.com:nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (4931t0f0u)
2020-07-11l10n: sv.po: Update Swedish translation (4931t0f0u)Libravatar Peter Krefting1-1127/+1399
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2020-07-11l10n: it.po: update the Italian translation for Git 2.28.0 round 1Libravatar Alessandro Menti1-1124/+1412
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
2020-07-10l10n: tr: v2.28.0 round 1Libravatar Emir Sarı1-1128/+1377
Signed-off-by: Emir Sarı <bitigchi@me.com>
2020-07-10l10n: git.pot: v2.28.0 round 1 (70 new, 14 removed)Libravatar Jiang Xin1-1102/+1350
Generate po/git.pot from v2.28.0-rc0 for git v2.28.0 l10n round 1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2020-07-09Git 2.28-rc0Libravatar Junio C Hamano1-3/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-09Merge branch 'mt/entry-fstat-fallback-fix' into masterLibravatar Junio C Hamano1-2/+1
"git checkout" failed to catch an error from fstat() after updating a path in the working tree. * mt/entry-fstat-fallback-fix: entry: check for fstat() errors after checkout
2020-07-09Merge branch 'ma/rebase-doc-typofix' into masterLibravatar Junio C Hamano1-1/+1
Typofix. * ma/rebase-doc-typofix: git-rebase.txt: fix description list separator
2020-07-09Merge branch 'jn/eject-fetch-write-commit-graph-out-of-experimental' into masterLibravatar Junio C Hamano3-14/+5
"fetch.writeCommitGraph" was enabled when "feature.experimental" is asked for, but it was found to be a bit too risky even for bold folks in its current shape. The configuration has been ejected, at least for now, from the "experimental" feature set. * jn/eject-fetch-write-commit-graph-out-of-experimental: experimental: default to fetch.writeCommitGraph=false
2020-07-09Merge branch 'tb/fix-persistent-shallow' into masterLibravatar Junio C Hamano4-1/+19
When "fetch.writeCommitGraph" configuration is set in a shallow repository and a fetch moves the shallow boundary, we wrote out broken commit-graph files that do not match the reality, which has been corrected. * tb/fix-persistent-shallow: commit.c: don't persist substituted parents when unshallowing