summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-03-18glossary: add definition for overlayLibravatar Thomas Gummerer1-0/+9
Add a definition for what overlay means in the context of git, to clarify the recently introduced overlay-mode in git checkout. Helped-by: Elijah Newren <newren@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-04revert "checkout: introduce checkout.overlayMode config"Libravatar Thomas Gummerer3-24/+1
This reverts 1495ff7da5 ("checkout: introduce checkout.overlayMode config", 2019-01-08) and thus removes the checkout.overlayMode config option. The option was originally introduced to give users the option to make the new no-overlay behaviour the default. However users may be using 'git checkout' in scripts, even though it is porcelain. Users setting the option to false may actually end up accidentally breaking scripts. With the introduction of a new subcommand that will make the behaviour the default, the config option will not be needed anymore anyway. Revert the commit and remove the config option, so we don't risk breaking scripts. Suggested-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-08checkout: introduce checkout.overlayMode configLibravatar Thomas Gummerer3-1/+24
In the previous patch we introduced a new no-overlay mode for git checkout. Some users (such as the author of this commit) may want to have this mode turned on by default as it matches their mental model more closely. Make that possible by introducing a new config option to that extend. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-08checkout: introduce --{,no-}overlay optionLibravatar Thomas Gummerer4-8/+116
Currently 'git checkout' is defined as an overlay operation, which means that if in 'git checkout <tree-ish> -- [<pathspec>]' we have an entry in the index that matches <pathspec>, but that doesn't exist in <tree-ish>, that entry will not be removed from the index or the working tree. Introduce a new --{,no-}overlay option, which allows using 'git checkout' in non-overlay mode, thus removing files from the working tree if they do not exist in <tree-ish> but match <pathspec>. Note that 'git checkout -p <tree-ish> -- [<pathspec>]' already works this way, so no changes are needed for the patch mode. We disallow 'git checkout --overlay -p' to avoid confusing users who would expect to be able to force overlay mode in 'git checkout -p' this way. Untracked files are not affected by this change, so 'git checkout --no-overlay HEAD -- untracked' will not remove untracked from the working tree. This is so e.g. 'git checkout --no-overlay HEAD -- dir/' doesn't delete all untracked files in dir/, but rather just resets the state of files that are known to git. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-02checkout: factor out mark_cache_entry_for_checkout functionLibravatar Thomas Gummerer1-31/+36
Factor out the code that marks a cache entry as matched for checkout into a separate function. We are going to introduce a new mode in 'git checkout' in a subsequent commit, that is going to have a slightly different logic. This would make this code unnecessarily complex. Moving that complexity into separate functions will make the code in the subsequent step easier to follow. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-02checkout: clarify commentLibravatar Thomas Gummerer1-4/+4
The key point for the if statement is that read_tree_some did not update the entry, because either it doesn't exist in tree-ish or doesn't match the pathspec. Clarify that. Suggested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-02read-cache: add invalidate parameter to remove_marked_cache_entriesLibravatar Thomas Gummerer4-4/+10
When marking cache entries for removal, and later removing them all at once using 'remove_marked_cache_entries()', cache entries currently have to be invalidated manually in the cache tree and in the untracked cache. Add an invalidate flag to the function. With the flag set, the function will take care of invalidating the path in the cache tree and in the untracked cache. Note that the current callsites already do the invalidation properly in other places, so we're just passing 0 from there to keep the status quo. This will be useful in a subsequent commit. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-02entry: support CE_WT_REMOVE flag in checkout_entryLibravatar Thomas Gummerer1-0/+11
'checkout_entry()' currently only supports creating new entries in the working tree, but not deleting them. Add the ability to remove entries at the same time if the entry is marked with the CE_WT_REMOVE flag. Currently this doesn't have any effect, as the CE_WT_REMOVE flag is only used in unpack-tree, however we will make use of this in a subsequent step in the series. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-02entry: factor out unlink_entry functionLibravatar Thomas Gummerer3-19/+20
Factor out the 'unlink_entry()' function from unpack-trees.c to entry.c. It will be used in other places as well in subsequent steps. As it's no longer a static function, also move the documentation to the header file to make it more discoverable. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-02move worktree tests to t24*Libravatar Thomas Gummerer5-0/+0
The 'git worktree' command used to be just another mode in 'git checkout', namely 'git checkout --to'. When the tests for the latter were retrofitted for the former, the test name was adjusted, but the test number was kept, even though the test is testing a different command now. t/README states: "Second digit tells the particular command we are testing.", so 'git worktree' should have a separate number just for itself. Move the worktree tests to t24* to adhere to that guideline. We're going to make use of the free'd up numbers in a subsequent commit. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-09Git 2.20Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-09Merge tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-poLibravatar Junio C Hamano9-28687/+44486
l10n-2.20.0-rnd3 * tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-po: (22 commits) l10n: de.po: fix two messages l10n: zh_CN: for git v2.20.0 l10n round 1 to 3 l10n: update German translation l10n: bg.po: Updated Bulgarian translation (4187t) l10n: sv.po: Update Swedish translation (4187t0f0u) l10n: fr.po v2.20.0 round 3 l10n: vi(4187t): Updated Vietnamese translation for v2.20.0 rd3 l10n: es.po v2.20.0 round 3 l10n: git.pot: v2.20.0 round 3 (5 new, 3 removed) l10n: vi(4185t): Updated Vietnamese translation for v2.20.0 l10n: es.po v2.20.0 round 1 l10n: bg.po: Updated Bulgarian translation (4185t) l10n: git.pot: v2.20.0 round 2 (2 new, 2 removed) l10n: bg.po: Updated Bulgarian translation (4185t) l10n: sv.po: Update Swedish translation (4185t0f0u) l10n: fr.po v2.20 rnd 1 l10n: Update Catalan translation l10n: git.pot: v2.20.0 round 1 (254 new, 27 removed) l10n: Update Catalan translation l10n: vi.po: fix typo in pack-objects ...
2018-12-07l10n: de.po: fix two messagesLibravatar Ralf Thielow1-2/+2
Reported-by: Phillip Szelat <phillip.szelat@gmail.com> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2018-12-06l10n: zh_CN: for git v2.20.0 l10n round 1 to 3Libravatar Jiang Xin1-3139/+4169
Translate 257 new messages (4187t0f0u) for git 2.20.0. Reviewed-by: Zhou Fangyi <fangyi.zhou@yuriko.moe> Reviewed-by: 依云 <lilydjwg@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2018-12-06l10n: update German translationLibravatar Ralf Thielow1-3106/+4332
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2018-12-04Merge branch 'es/format-patch-range-diff-fix-fix'Libravatar Junio C Hamano3-9/+33
* es/format-patch-range-diff-fix-fix: range-diff: always pass at least minimal diff options
2018-12-04Merge branch 'en/rebase-consistency'Libravatar Junio C Hamano1-13/+17
* en/rebase-consistency: rebase docs: fix incorrect format of the section Behavioral Differences
2018-12-04rebase docs: fix incorrect format of the section Behavioral DifferencesLibravatar Johannes Sixt1-13/+17
The text body of section Behavioral Differences is typeset as code, but should be regular text. Remove the indentation to achieve that. While here, prettify the language: - use "the x backend" instead of "x-based rebase"; - use present tense instead of future tense; and use subsections instead of a list. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04RelNotes 2.20: drop spurious double quoteLibravatar Martin Ågren1-1/+1
We have three double-quote characters, which is one too many or too few. Dropping the last one seems to match the original intention best. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04RelNotes 2.20: clarify sentenceLibravatar Martin Ågren1-1/+1
I had to read this sentence a few times to understand it. Let's try to clarify it. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04RelNotes 2.20: move some items between sectionsLibravatar Martin Ågren1-13/+13
Some items that should be in "Performance, Internal Implementation, Development Support etc." have ended up in "UI, Workflows & Features" and "Fixes since v2.19". Move them, and do s/uses/use/ while at it. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04range-diff: always pass at least minimal diff optionsLibravatar Martin Ågren3-9/+33
Commit d8981c3f88 ("format-patch: do not let its diff-options affect --range-diff", 2018-11-30) taught `show_range_diff()` to accept a NULL-pointer as an indication that it should use its own "reasonable default". That fixed a regression from a5170794 ("Merge branch 'ab/range-diff-no-patch'", 2018-11-18), but unfortunately it introduced a regression of its own. In particular, it means we forget the `file` member of the diff options, so rather than placing a range-diff in the cover-letter, we write it to stdout. In order to fix this, rewrite the two callers adjusted by d8981c3f88 to instead create a "dummy" set of diff options where they only fill in the fields we absolutely require, such as output file and color. Modify and extend the existing tests to try and verify that the right contents end up in the right place. Don't revert `show_range_diff()`, i.e., let it keep accepting NULL. Rather than removing what is dead code and figuring out it isn't actually dead and we've broken 2.20, just leave it for now. [es: retain diff coloring when going to stdout] Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-03Merge branch 'master' of git://github.com/alshopov/git-poLibravatar Jiang Xin1-115/+124
2018-12-02l10n: bg.po: Updated Bulgarian translation (4187t)Libravatar Alexander Shopov1-115/+124
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2018-12-02l10n: sv.po: Update Swedish translation (4187t0f0u)Libravatar Peter Krefting1-221/+231
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2018-12-02Merge branch 'fr_2.20_round3' of git://github.com/jnavila/gitLibravatar Jiang Xin1-256/+321
2018-12-02l10n: fr.po v2.20.0 round 3Libravatar Jean-Noël Avila1-256/+321
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2018-12-02Merge branch 'master' of https://github.com/vnwildman/gitLibravatar Jiang Xin1-117/+127
2018-12-02l10n: vi(4187t): Updated Vietnamese translation for v2.20.0 rd3Libravatar Tran Ngoc Quan1-117/+127
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2018-12-01l10n: es.po v2.20.0 round 3Libravatar Christopher Diaz Riveros1-267/+277
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2018-12-02l10n: git.pot: v2.20.0 round 3 (5 new, 3 removed)Libravatar Jiang Xin1-109/+119
Generate po/git.pot from v2.20.0-rc2 for git v2.20.0 l10n round 3. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2018-12-02Merge branch 'master' of git://github.com/git-l10n/git-poLibravatar Jiang Xin9-24680/+38109
2018-12-02Merge branch 'master' of https://github.com/vnwildman/gitLibravatar Jiang Xin1-3046/+4221
2018-12-02l10n: vi(4185t): Updated Vietnamese translation for v2.20.0Libravatar Tran Ngoc Quan1-3046/+4221
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2018-12-01l10n: es.po v2.20.0 round 1Libravatar Christopher Diaz Riveros1-3044/+4214
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2018-12-01Git 2.20-rc2Libravatar Junio C Hamano2-1/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-01Merge branch 'gh/diff-raw-has-no-ellipses'Libravatar Junio C Hamano1-8/+8
"git diff --raw" lost ellipses to adjust the output columns for some time now, but the documentation still showed them. * gh/diff-raw-has-no-ellipses: doc: update diff-format.txt for removed ellipses in --raw
2018-12-01Merge branch 'ss/msvc-strcasecmp'Libravatar Junio C Hamano1-7/+1
MSVC update. * ss/msvc-strcasecmp: msvc: directly use MS version (_stricmp) of strcasecmp
2018-12-01Merge branch 'sg/test-BUG'Libravatar Junio C Hamano7-23/+26
test framework has been updated to make a bug in the test script (as opposed to bugs in Git that are discovered by running the tests) stand out more prominently. * sg/test-BUG: tests: send "bug in the test script" errors to the script's stderr
2018-12-01Merge branch 'sg/test-cmp-rev'Libravatar Junio C Hamano1-3/+17
Test framework update. * sg/test-cmp-rev: test-lib-functions: make 'test_cmp_rev' more informative on failure
2018-12-01Merge branch 'ab/push-example-in-doc'Libravatar Junio C Hamano1-2/+2
An error message that sugggests how to give correct arguments to "git push" has been updated. * ab/push-example-in-doc: push: change needlessly ambiguous example in error
2018-12-01Merge branch 'rt/rebase-in-c-message-fix'Libravatar Junio C Hamano1-2/+2
* rt/rebase-in-c-message-fix: builtin/rebase.c: remove superfluous space in messages
2018-12-01Merge branch 'sg/daemon-test-signal-fix'Libravatar Junio C Hamano1-1/+1
Test fix. * sg/daemon-test-signal-fix: t/lib-git-daemon: fix signal checking
2018-12-01Merge branch 'ma/reset-doc-rendering-fix'Libravatar Junio C Hamano1-130/+147
Doc updates. * ma/reset-doc-rendering-fix: git-reset.txt: render literal examples as monospace git-reset.txt: render tables correctly under Asciidoctor
2018-12-01Merge branch 'ab/replace-graft-with-replace-advice'Libravatar Junio C Hamano2-1/+5
The advice message to tell the user to migrate an existing graft file to the replace system when a graft file was read was shown even when "git replace --convert-graft-file" command, which is the way the message suggests to use, was running, which made little sense. * ab/replace-graft-with-replace-advice: advice: don't pointlessly suggest --convert-graft-file
2018-12-01Merge branch 'js/rebase-stat-unrelated-fix'Libravatar Junio C Hamano3-8/+30
"git rebase --stat" to transplant a piece of history onto a totally unrelated history were not working before and silently showed wrong result. With the recent reimplementation in C, it started to instead die with an error message, as the original logic was not prepared to cope with this case. This has now been fixed. * js/rebase-stat-unrelated-fix: rebase --stat: fix when rebasing to an unrelated history
2018-12-01Merge branch 'js/rebase-reflog-action-fix'Libravatar Junio C Hamano2-3/+52
"git rebase" reimplemented recently in C accidentally changed the way reflog entries are recorded (earlier "rebase -i" identified the entries it leaves with "rebase -i", but the new version always marks them with "rebase"). This has been corrected. * js/rebase-reflog-action-fix: rebase: fix GIT_REFLOG_ACTION regression
2018-12-01Merge branch 'jc/format-patch-range-diff-fix'Libravatar Junio C Hamano5-3/+17
"git format-patch --range-diff" by mistake passed the diff options used to generate the primary output of the command to the range-diff machinery, which caused the range-diff in the cover letter to include fairly useless "--stat" output. This has been corrected by forcing a non-customizable default formatting options on the range-diff machinery when driven by format-patch. * jc/format-patch-range-diff-fix: format-patch: do not let its diff-options affect --range-diff
2018-12-01builtin/rebase.c: remove superfluous space in messagesLibravatar Ralf Thielow1-2/+2
The whitespace breakages in these messages were introduced while reimplementing the subcommand in C. Match these messages to those in the original scripted version. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-01l10n: bg.po: Updated Bulgarian translation (4185t)Libravatar Alexander Shopov1-202/+208
Signed-off-by: Alexander Shopov <ash@kambanaria.org>