summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* refs/files-backend: don't peek into `struct lock_file`Martin Ågren2021-01-061-2/+2
| | | | | | | | | | | | Similar to the previous commits, avoid peeking into the `struct lock_file`. Use the lock file API instead. Note how we obtain the path to the lock file if `fdopen_lock_file()` failed and that this is not a problem: as documented in lockfile.h, failure to "fdopen" does not roll back the lock file and we're free to, e.g., query it for its path. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* midx: don't peek into `struct lock_file`Martin Ågren2021-01-061-1/+1
| | | | | | | | | | | | | | | Similar to the previous commits, avoid peeking into the `struct lock_file`. Use the lock file API instead. The two functions we're calling here double-check that the tempfile is indeed "active", which is arguably overkill considering how we took the lock on the line immediately above. More importantly, this future-proofs us against, e.g., other code appearing between these two lines or the lock file and/or tempfile internals changing. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit-graph: don't peek into `struct lock_file`Martin Ågren2021-01-061-3/+3
| | | | | | | | | Similar to the previous commit, avoid peeking into the `struct lock_file`. Use the lock file API instead. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* builtin/gc: don't peek into `struct lock_file`Martin Ågren2021-01-061-3/+3
| | | | | | | | | | | A `struct lock_file` is pretty much just a wrapper around a tempfile. But it's easy enough to avoid relying on this. Use the wrappers that the lock file API provides rather than peeking at the temp file or even into *its* internals. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 2.30v2.30.0Junio C Hamano2020-12-282-12/+9
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'pb/doc-git-linkit-fix'Junio C Hamano2020-12-281-2/+2
|\ | | | | | | | | | | | | Docfix. * pb/doc-git-linkit-fix: git.txt: fix typos in 'linkgit' macro invocation
| * git.txt: fix typos in 'linkgit' macro invocationPhilippe Blain2020-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The 'linkgit' Asciidoc macro is misspelled as 'linkit' in the description of 'GIT_SEQUENCE_EDITOR' since the addition of that variable to git(1) in 902a126eca (doc: mention GIT_SEQUENCE_EDITOR and 'sequence.editor' more, 2020-08-31). Also, it uses two colons instead of one. Fix that. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge tag 'l10n-2.30.0-rnd2' of https://github.com/git-l10n/git-poJunio C Hamano2020-12-2812-26547/+53354
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l10n for Git 2.30.0 round 2 * tag 'l10n-2.30.0-rnd2' of https://github.com/git-l10n/git-po: l10n: zh_CN: for git v2.30.0 l10n round 1 and 2 l10n: zh_TW.po: v2.30.0 round 2 (1 untranslated) l10n: pl.po: add translation and set team leader l10n: pl.po: started Polish translation l10n: de.po: Update German translation for Git 2.30.0 l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (5037t) l10n: fr.po v2.30.0 rnd 2 l10n: tr: v2.30.0-r2 l10n: sv.po: Update Swedish translation (5037t0f0u) l10n: vi.po(5037t): v2.30.0 rnd 2 l10n: git.pot: v2.30.0 round 2 (1 new, 2 removed) l10n: Update Catalan translation l10n: fr.po: v2.30.0 rnd 1 l10n: fr.po Fix a typo l10n: fr fix misleading message l10n: tr: v2.30.0-r1 l10n: sv.po: Update Swedish translation (5038t0f0u) l10n: git.pot: v2.30.0 round 1 (70 new, 45 removed)
| * | l10n: zh_CN: for git v2.30.0 l10n round 1 and 2Jiang Xin2020-12-271-2475/+2588
| | | | | | | | | | | | | | | | | | | | | Translate 71 new messages (5037t0f0u) for git 2.30.0. Reviewed-by: 依云 <lilydjwg@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | Merge branch 'l10n/zh_TW/201223' of github.com:l10n-tw/git-poJiang Xin2020-12-251-2744/+2602
| |\ \ | | | | | | | | | | | | | | | | * 'l10n/zh_TW/201223' of github.com:l10n-tw/git-po: l10n: zh_TW.po: v2.30.0 round 2 (1 untranslated)
| | * | l10n: zh_TW.po: v2.30.0 round 2 (1 untranslated)pan934122020-12-251-2744/+2602
| | | | | | | | | | | | | | | | Signed-off-by: pan93412 <pan93412@gmail.com>
| * | | l10n: pl.po: add translation and set team leaderArusekk2020-12-232-8992/+22386
| | | | | | | | | | | | | | | | Signed-off-by: Arusekk <arek_koz@o2.pl>
| * | | l10n: pl.po: started Polish translationm4sk1n2020-12-231-0/+12579
| |/ / | | | | | | | | | Signed-off-by: Arusekk <arek_koz@o2.pl>
| * | l10n: de.po: Update German translation for Git 2.30.0Matthias Rüster2020-12-231-2600/+2729
| | | | | | | | | | | | | | | | | | Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com> Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
| * | Merge branch 'master' of github.com:Softcatala/git-poJiang Xin2020-12-231-1082/+755
| |\ \ | | | | | | | | | | | | | | | | * 'master' of github.com:Softcatala/git-po: l10n: Update Catalan translation
| | * | l10n: Update Catalan translationJordi Mas2020-12-221-1082/+755
| | | | | | | | | | | | | | | | Signed-off-by: Jordi Mas <jmas@softcatala.org>
| * | | l10n: bg.po: Updated Bulgarian translation (5037t)Alexander Shopov2020-12-221-2480/+2600
| | | | | | | | | | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * | | Merge branch 'fr_2.30_rnd2' of github.com:jnavila/gitJiang Xin2020-12-221-382/+419
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * 'fr_2.30_rnd2' of github.com:jnavila/git: l10n: fr.po v2.30.0 rnd 2
| | * | | l10n: fr.po v2.30.0 rnd 2Jean-Noël Avila2020-12-211-382/+419
| | |/ / | | | | | | | | | | | | Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
| * / / l10n: tr: v2.30.0-r2Emir Sarı2020-12-211-374/+392
| |/ / | | | | | | | | | Signed-off-by: Emir Sarı <bitigchi@me.com>
| * | l10n: sv.po: Update Swedish translation (5037t0f0u)Peter Krefting2020-12-211-371/+393
| | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | l10n: vi.po(5037t): v2.30.0 rnd 2Tran Ngoc Quan2020-12-211-2621/+2783
| | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * | l10n: git.pot: v2.30.0 round 2 (1 new, 2 removed)Jiang Xin2020-12-211-370/+376
| | | | | | | | | | | | | | | | | | Generate po/git.pot from v2.30.0-rc1 for git v2.30.0 l10n round 2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | Merge remote-tracking branch 'github/master' into git-po-masterJiang Xin2020-12-2143-1794/+2162
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * github/master: (42 commits) Git 2.30-rc1 git-gui: use gray background for inactive text widgets Another batch before 2.30-rc1 git-gui: Fix selected text colors Makefile: conditionally include GIT-VERSION-FILE git-gui: fix colored label backgrounds when using themed widgets config.mak.uname: remove old NonStop compatibility settings diff: correct interaction between --exit-code and -I<pattern> t/perf: fix test_export() failure with BSD `sed` style: do not "break" in switch() after "return" compat-util: pretend that stub setitimer() always succeeds strmap: make callers of strmap_remove() to call it in void context doc: mention Python 3.x supports index-format.txt: document v2 format of file system monitor extension docs: multi-pack-index: remove note about future 'verify' work init: provide useful advice about init.defaultBranch get_default_branch_name(): prepare for showing some advice branch -m: allow renaming a yet-unborn branch init: document `init.defaultBranch` better t7900: use --fixed-value in git-maintenance tests ...
| * | | l10n: Update Catalan translationJordi Mas2020-12-191-2704/+2992
| | | | | | | | | | | | | | | | Signed-off-by: Jordi Mas <jmas@softcatala.org>
| * | | Merge branch 'fr_next' of github.com:jnavila/git into git-po-masterJiang Xin2020-12-171-2400/+2413
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'fr_next' of github.com:jnavila/git: l10n: fr.po: v2.30.0 rnd 1 l10n: fr.po Fix a typo l10n: fr fix misleading message
| | * | | l10n: fr.po: v2.30.0 rnd 1Jean-Noël Avila2020-12-161-2396/+2409
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
| | * | | l10n: fr.po Fix a typoBaptiste Fontaine2020-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr>
| | * | | l10n: fr fix misleading messageJean-Noël Avila2020-12-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Reported-by: Sami Boukortt <sami@boukortt.com>
| * | | | Merge branch '2.30-rc1' of github.com:bitigchi/git-poJiang Xin2020-12-171-2410/+2506
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | * '2.30-rc1' of github.com:bitigchi/git-po: l10n: tr: v2.30.0-r1
| | * | | l10n: tr: v2.30.0-r1Emir Sarı2020-12-161-2410/+2506
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Emir Sarı <bitigchi@me.com>
| * | | | l10n: sv.po: Update Swedish translation (5038t0f0u)Peter Krefting2020-12-151-2332/+2532
| |/ / / | | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | | l10n: git.pot: v2.30.0 round 1 (70 new, 45 removed)Jiang Xin2020-12-151-2276/+2375
| | | | | | | | | | | | | | | | | | | | | | | | Generate po/git.pot from v2.30.0-rc0 for git v2.30.0 l10n round 1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
* | | | Git 2.30-rc2v2.30.0-rc2Junio C Hamano2020-12-232-1/+6
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'nk/refspecs-negative-fix'Junio C Hamano2020-12-232-3/+64
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hotfix for recent regression. * nk/refspecs-negative-fix: negative-refspec: improve comment on query_matches_negative_refspec negative-refspec: fix segfault on : refspec
| * | | | negative-refspec: improve comment on query_matches_negative_refspecNipunn Koorapati2020-12-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comment did not adequately explain how the two loops work together to achieve the goal of querying for matching of any negative refspec. Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | negative-refspec: fix segfault on : refspecNipunn Koorapati2020-12-222-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic added to check for negative pathspec match by c0192df630 (refspec: add support for negative refspecs, 2020-09-30) looks at refspec->src assuming it is never NULL, however when remote.origin.push is set to ":", then refspec->src is NULL, causing a segfault within strcmp. Tell git to handle matching refspec by adding the needle to the set of positively matched refspecs, since matching ":" refspecs match anything as src. Add test for matching refspec pushes fetch-negative-refspec both individually and in combination with a negative refspec. Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ma/maintenance-crontab-fix'Junio C Hamano2020-12-233-5/+20
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hotfix for a topic of this cycle. * ma/maintenance-crontab-fix: t7900-maintenance: test for magic markers gc: fix handling of crontab magic markers git-maintenance.txt: add missing word
| * | | | | t7900-maintenance: test for magic markersMartin Ågren2020-12-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we insert our "BEGIN" and "END" markers into the cron table, it's so that a Git version from many years into the future would be able to identify this region in the cron table. Let's add a test to make sure that these markers don't ever change. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | gc: fix handling of crontab magic markersMartin Ågren2020-12-212-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On `git maintenance start`, we add a few entries to the user's cron table. We wrap our entries using two magic markers, "# BEGIN GIT MAINTENANCE SCHEDULE" and "# END GIT MAINTENANCE SCHEDULE". At a later `git maintenance stop`, we will go through the table and remove these lines. Or rather, we will remove the "BEGIN" marker, the "END" marker and everything between them. Alas, we have a bug in how we detect the "END" marker: we don't. As we loop through all the lines of the crontab, if we are in the "old region", i.e., the region we're aiming to remove, we make an early `continue` and don't get as far as checking for the "END" marker. Thus, once we've seen our "BEGIN", we remove everything until the end of the file. Rewrite the logic for identifying these markers. There are four cases that are mutually exclusive: The current line starts a region or it ends it, or it's firmly within the region, or it's outside of it (and should be printed). Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | git-maintenance.txt: add missing wordMartin Ågren2020-12-211-1/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a missing "a" before "bunch". Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'dl/checkout-p-merge-base'Junio C Hamano2020-12-232-2/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix to a regression introduced during this cycle. * dl/checkout-p-merge-base: checkout -p: handle tree arguments correctly again
| * | | | | checkout -p: handle tree arguments correctly againJohannes Schindelin2020-12-212-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a segmentation fault. The bug is caused by dereferencing `new_branch_info->commit` when it is `NULL`, which is the case when the tree-ish argument is actually a tree, not a commit-ish. This was introduced in 5602b500c3c (builtin/checkout: fix `git checkout -p HEAD...` bug, 2020-10-07), where we tried to ensure that the special tree-ish `HEAD...` is handled correctly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'js/no-more-prepare-for-main-in-test'Junio C Hamano2020-12-2311-619/+621
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test coverage fix. * js/no-more-prepare-for-main-in-test: tests: drop the `PREPARE_FOR_MAIN_BRANCH` prereq t9902: use `main` as initial branch name t6302: use `main` as initial branch name t5703: use `main` as initial branch name t5510: use `main` as initial branch name t5505: finalize transitioning to using the branch name `main` t3205: finalize transitioning to using the branch name `main` t3203: complete the transition to using the branch name `main` t3201: finalize transitioning to using the branch name `main` t3200: finish transitioning to the initial branch name `main` t1400: use `main` as initial branch name
| * | | | | | tests: drop the `PREPARE_FOR_MAIN_BRANCH` prereqJohannes Schindelin2020-12-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer use it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t9902: use `main` as initial branch nameJohannes Schindelin2020-12-171-154/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 8164360fc86 (t9902: prepare a test for the upcoming default branch name, 2020-10-23), we started adjusting this test script for the default initial branch name changing to `main`. However, there is no need to wait for that: let's adjust the test script to stop relying on a specific initial branch name by setting it explicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from one test case. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t6302: use `main` as initial branch nameJohannes Schindelin2020-12-171-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 66713e84e71 (tests: prepare aligned mentions of the default branch name, 2020-10-23), we started adjusting this test script for the default initial branch name changing to `main`. However, there is no need to wait for that: let's adjust the test script to stop relying on a specific initial branch name by setting it explicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from six test cases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t5703: use `main` as initial branch nameJohannes Schindelin2020-12-171-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 97cf8d50b59 (t5703: adjust a test case for the upcoming default branch name, 2020-10-23), we prepared this test script for a world when the default initial branch name would be `main`. However, there is no need to wait for that: let's adjust the test script to stop relying on a specific initial branch name by setting it explicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from one test case. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t5510: use `main` as initial branch nameJohannes Schindelin2020-12-171-83/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 66713e84e71 (tests: prepare aligned mentions of the default branch name, 2020-10-23), we prepared this test script for a time when the default initial branch name would be `main`. However, there is no need to wait for that: let's adjust the test script to stop relying on a specific initial branch name by setting it explicitly. This allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from two test cases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t5505: finalize transitioning to using the branch name `main`Johannes Schindelin2020-12-171-78/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 66713e84e71 (tests: prepare aligned mentions of the default branch name, 2020-10-23), we started that transition, trying to prepare for a time when `git init` would use that name for the initial branch. Even if that time has not arrived, we can complete the transition by making the test script independent of the default branch name. This also allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from four test cases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>