Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 36eb1cb
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e92aa0e
Choose a head ref
  • 9 commits
  • 14 files changed
  • 1 contributor

Commits on Jan 2, 2019

  1. move worktree tests to t24*

    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>
    tgummerer authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    a0cc584 View commit details
    Browse the repository at this point in the history
  2. entry: factor out unlink_entry function

    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>
    tgummerer authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    b702dd1 View commit details
    Browse the repository at this point in the history
  3. entry: support CE_WT_REMOVE flag in checkout_entry

    '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>
    tgummerer authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    536ec18 View commit details
    Browse the repository at this point in the history
  4. read-cache: add invalidate parameter to remove_marked_cache_entries

    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>
    tgummerer authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    6fdc205 View commit details
    Browse the repository at this point in the history
  5. checkout: clarify comment

    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>
    tgummerer authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    5160fa0 View commit details
    Browse the repository at this point in the history
  6. checkout: factor out mark_cache_entry_for_checkout function

    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>
    tgummerer authored and gitster committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    b7033e7 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2019

  1. checkout: introduce --{,no-}overlay option

    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>
    tgummerer authored and gitster committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    091e04b View commit details
    Browse the repository at this point in the history
  2. checkout: introduce checkout.overlayMode config

    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>
    tgummerer authored and gitster committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    1495ff7 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2019

  1. revert "checkout: introduce checkout.overlayMode config"

    This reverts 1495ff7 ("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>
    tgummerer authored and gitster committed Feb 4, 2019
    Configuration menu
    Copy the full SHA
    e92aa0e View commit details
    Browse the repository at this point in the history
Loading