Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
'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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
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
...
|
|
Reported-by: Phillip Szelat <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
|
|
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>
|
|
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
|
|
* es/format-patch-range-diff-fix-fix:
range-diff: always pass at least minimal diff options
|
|
* en/rebase-consistency:
rebase docs: fix incorrect format of the section Behavioral Differences
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
|
|
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
|
|
|
|
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
|
|
|
|
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
|
|
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
|
|
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>
|
|
|
|
|
|
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
|
|
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
|
|
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
"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
|
|
MSVC update.
* ss/msvc-strcasecmp:
msvc: directly use MS version (_stricmp) of strcasecmp
|
|
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
|
|
Test framework update.
* sg/test-cmp-rev:
test-lib-functions: make 'test_cmp_rev' more informative on failure
|
|
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
|
|
* rt/rebase-in-c-message-fix:
builtin/rebase.c: remove superfluous space in messages
|
|
Test fix.
* sg/daemon-test-signal-fix:
t/lib-git-daemon: fix signal checking
|
|
Doc updates.
* ma/reset-doc-rendering-fix:
git-reset.txt: render literal examples as monospace
git-reset.txt: render tables correctly under Asciidoctor
|
|
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
|
|
"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
|
|
"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
|
|
"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
|
|
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>
|
|
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
|