[PATCH v2 2/2] commit-graph: fix writing first commit-graph during fetch

2019-10-23 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The previous commit includes a failing test for an issue around fetch.writeCommitGraph and fetching in a repo with a submodule. Here, we fix that bug and set the test to "test_expect_success". The prolem arises with this set of commands when the remote repo at has a submodu

[PATCH v2 0/2] [v2.24.0-rc0 BUG] fetch.writeCommitGraph fails on first fetch

2019-10-23 Thread Derrick Stolee via GitGitGadget
UPDATE for V2: We now know the full repro, and a test is added. Thanks Szeder and Peff for your insights! While dogfooding, Johannes found a bug in the fetch.writeCommitGraph config behavior. While his example initially happened during a clone with --recurse-submodules, (UPDATE) and the submodule

[PATCH v2 1/2] t5510-fetch.sh: demonstrate fetch.writeCommitGraph bug

2019-10-23 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee While dogfooding, Johannes found a bug in the fetch.writeCommitGraph config behavior. His example initially happened during a clone with --recurse-submodules, we found that this happens with the first fetch after cloning a repository that contains a submodule: $ git

[PATCH v3 0/1] ci: update caskroom/cask/perforce to new location

2019-10-22 Thread Derrick Stolee via GitGitGadget
Running CI on Mac OS X in Azure Pipelines is currently broken due to a moved homebrew package. Change since v2: * The commit message was improved (thanks Gábor). Change since v1: -The step is now more robust (by pulling homebrew-cask and trying again if the pull failed). Thanks, -Stolee Johan

[PATCH 0/1] [v2.24.0-rc0 BUG] fetch.writeCommitGraph fails on first fetch

2019-10-22 Thread Derrick Stolee via GitGitGadget
While dogfooding, Johannes found a bug in the fetch.writeCommitGraph config behavior. While his example initially happened during a clone with --recurse-submodules, we found that it is actually a problem with the first fetch after a new clone and no existing commit-graph file: $ git clone test $

[PATCH 1/1] commit-graph: fix writing first commit-graph during fetch

2019-10-22 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee While dogfooding, Johannes found a bug in the fetch.writeCommitGraph config behavior. While his example initially happened during a clone with --recurse-submodules, we found that it is actually a problem with the first fetch after a new clone and no existing commit-graph file

[PATCH v5 04/17] sparse-checkout: 'set' subcommand

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns as arguments and writes them to the sparse-checkout file. Then, it updates the working directory using 'git read-tree -mu HEAD'. The 'set' subcommand will replace the entire contents of the sparse-checkout fil

[PATCH v5 17/17] sparse-checkout: cone mode should not interact with .gitignore

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee During the development of the sparse-checkout "cone mode" feature, an incorrect placement of the initializer for "use_cone_patterns = 1" caused warnings to show up when a .gitignore file was present with non-cone-mode patterns. This was fixed in the original commit introducin

[PATCH v5 03/17] clone: add --sparse mode

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When someone wants to clone a large repository, but plans to work using a sparse-checkout file, they either need to do a full checkout first and then reduce the patterns they included, or clone with --no-checkout, set up their patterns, and then run a checkout manually. This

[PATCH v5 02/17] sparse-checkout: create 'init' subcommand

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Getting started with a sparse-checkout file can be daunting. Help users start their sparse enlistment using 'git sparse-checkout init'. This will set 'core.sparseCheckout=true' in their config, write an initial set of patterns to the sparse-checkout file, and update their wor

[PATCH v5 12/17] unpack-trees: add progress to clear_ce_flags()

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When a large repository has many sparse-checkout patterns, the process for updating the skip-worktree bits can take long enough that a user gets confused why nothing is happening. Update the clear_ce_flags() method to write progress. Signed-off-by: Derrick Stolee --- cache

[PATCH v5 16/17] sparse-checkout: write using lockfile

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If two 'git sparse-checkout set' subcommands are launched at the same time, the behavior can be unexpected as they compete to write the sparse-checkout file and update the working directory. Take a lockfile around the writes to the sparse-checkout file. In addition, acquire

[PATCH v5 13/17] read-tree: show progress by default

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The read-tree builtin has a --verbose option that signals to show progress and other data while updating the index. Update this to be on by default when stderr is a terminal window. This will help tools like 'git sparse-checkout' to automatically benefit from progress indica

[PATCH v5 15/17] sparse-checkout: update working directory in-process

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout builtin used 'git read-tree -mu HEAD' to update the skip-worktree bits in the index and to update the working directory. This extra process is overly complex, and prone to failure. It also requires that we write our changes to the sparse-checkout file befo

[PATCH v5 10/17] sparse-checkout: init and set in cone mode

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout [init|set]'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckoutCone=true'. When running 'git sparse-checkout set' in cone mode, a user only needs

[PATCH v5 08/17] sparse-checkout: add 'cone' mode

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new Boolean config option, core.sparseCheckoutCone, to

[PATCH v5 14/17] sparse-checkout: sanitize for nested folders

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If a user provides folders A/ and A/B/ for inclusion in a cone-mode sparse-checkout file, the parsing logic will notice that A/ appears both as a "parent" type pattern and as a "recursive" type pattern. This is unexpected and hence will complain via a warning and revert to th

[PATCH v5 11/17] unpack-trees: hash less in cone mode

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature in "cone mode" can use the fact that the recursive patterns are "connected" to the root via parent patterns to decide if a directory is entirely contained in the sparse-checkout or entirely removed. In these cases, we can skip hashing the paths wi

[PATCH v5 05/17] sparse-checkout: add '--stdin' option to set subcommand

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns and places them in the sparse-checkout file. Then, it updates the working directory to match those patterns. For a large list of patterns, the command-line call can get very cumbersome. Add a '--stdin' option

[PATCH v5 00/17] New sparse-checkout builtin and "cone" mode

2019-10-21 Thread Derrick Stolee via GitGitGadget
V4 UPDATE: Rebased on latest master to include ew/hashmap and ds/include-exclude in the base. This series makes the sparse-checkout feature more user-friendly. While there, I also present a way to use a limited set of patterns to gain a significant performance boost in very large repositories. Sp

[PATCH v5 09/17] sparse-checkout: use hashmaps for cone patterns

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The parent and recursive patterns allowed by the "cone mode" option in sparse-checkout are restrictive enough that we can avoid using the regex parsing. Everything is based on prefix matches, so we can use hashsets to store the prefixes from the sparse-checkout file. When che

[PATCH v5 06/17] sparse-checkout: create 'disable' subcommand

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The instructions for disabling a sparse-checkout to a full working directory are complicated and non-intuitive. Add a subcommand, 'git sparse-checkout disable', to perform those steps for the user. Signed-off-by: Derrick Stolee --- Documentation/git-sparse-checkout.txt | 2

[PATCH v5 01/17] sparse-checkout: create builtin with 'list' subcommand

2019-10-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature is mostly hidden to users, as its only documentation is supplementary information in the docs for 'git read-tree'. In addition, users need to know how to edit the .git/info/sparse-checkout file with the right patterns, then run the appropriate 'git

[PATCH v2 0/1] ci: update caskroom/cask/perforce to new location

2019-10-17 Thread Derrick Stolee via GitGitGadget
Running CI on Mac OS X in Azure Pipelines is currently broken due to a moved homebrew package. Updates in V2: Johannes helped to make the step even more robust. Thanks, -Stolee Johannes Schindelin (1): ci(osx): use new location of the `perforce` cask ci/install-dependencies.sh | 5 + 1 f

[PATCH 0/1] ci: update caskroom/cask/perforce to new location

2019-10-15 Thread Derrick Stolee via GitGitGadget
Running CI on Mac OS X in Azure Pipelines is currently broken due to a moved homebrew package. Thanks, -Stolee Johannes Schindelin (1): ci(osx): use new location of the `perforce` cask ci/install-dependencies.sh | 1 + 1 file changed, 1 insertion(+) base-commit: 108b97dc372828f0e72e56bbb40c

[PATCH v4 02/17] sparse-checkout: create 'init' subcommand

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Getting started with a sparse-checkout file can be daunting. Help users start their sparse enlistment using 'git sparse-checkout init'. This will set 'core.sparseCheckout=true' in their config, write an initial set of patterns to the sparse-checkout file, and update their wor

[PATCH v4 05/17] sparse-checkout: add '--stdin' option to set subcommand

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns and places them in the sparse-checkout file. Then, it updates the working directory to match those patterns. For a large list of patterns, the command-line call can get very cumbersome. Add a '--stdin' option

[PATCH v4 08/17] sparse-checkout: add 'cone' mode

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new Boolean config option, core.sparseCheckoutCone, to

[PATCH v4 01/17] sparse-checkout: create builtin with 'list' subcommand

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature is mostly hidden to users, as its only documentation is supplementary information in the docs for 'git read-tree'. In addition, users need to know how to edit the .git/info/sparse-checkout file with the right patterns, then run the appropriate 'git

[PATCH v4 15/17] sparse-checkout: update working directory in-process

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout builtin used 'git read-tree -mu HEAD' to update the skip-worktree bits in the index and to update the working directory. This extra process is overly complex, and prone to failure. It also requires that we write our changes to the sparse-checkout file befo

[PATCH v4 16/17] sparse-checkout: write using lockfile

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If two 'git sparse-checkout set' subcommands are launched at the same time, the behavior can be unexpected as they compete to write the sparse-checkout file and update the working directory. Take a lockfile around the writes to the sparse-checkout file. In addition, acquire

[PATCH v4 09/17] sparse-checkout: use hashmaps for cone patterns

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The parent and recursive patterns allowed by the "cone mode" option in sparse-checkout are restrictive enough that we can avoid using the regex parsing. Everything is based on prefix matches, so we can use hashsets to store the prefixes from the sparse-checkout file. When che

[PATCH v4 11/17] unpack-trees: hash less in cone mode

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature in "cone mode" can use the fact that the recursive patterns are "connected" to the root via parent patterns to decide if a directory is entirely contained in the sparse-checkout or entirely removed. In these cases, we can skip hashing the paths wi

[PATCH v4 13/17] read-tree: show progress by default

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The read-tree builtin has a --verbose option that signals to show progress and other data while updating the index. Update this to be on by default when stderr is a terminal window. This will help tools like 'git sparse-checkout' to automatically benefit from progress indica

[PATCH v4 17/17] sparse-checkout: cone mode should not interact with .gitignore

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee During the development of the sparse-checkout "cone mode" feature, an incorrect placement of the initializer for "use_cone_patterns = 1" caused warnings to show up when a .gitignore file was present with non-cone-mode patterns. This was fixed in the original commit introducin

[PATCH v4 10/17] sparse-checkout: init and set in cone mode

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout [init|set]'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckoutCone=true'. When running 'git sparse-checkout set' in cone mode, a user only needs

[PATCH v4 12/17] unpack-trees: add progress to clear_ce_flags()

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When a large repository has many sparse-checkout patterns, the process for updating the skip-worktree bits can take long enough that a user gets confused why nothing is happening. Update the clear_ce_flags() method to write progress. Signed-off-by: Derrick Stolee --- cache

[PATCH v4 14/17] sparse-checkout: sanitize for nested folders

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If a user provides folders A/ and A/B/ for inclusion in a cone-mode sparse-checkout file, the parsing logic will notice that A/ appears both as a "parent" type pattern and as a "recursive" type pattern. This is unexpected and hence will complain via a warning and revert to th

[PATCH v4 06/17] sparse-checkout: create 'disable' subcommand

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The instructions for disabling a sparse-checkout to a full working directory are complicated and non-intuitive. Add a subcommand, 'git sparse-checkout disable', to perform those steps for the user. Signed-off-by: Derrick Stolee --- Documentation/git-sparse-checkout.txt | 2

[PATCH v4 00/17] New sparse-checkout builtin and "cone" mode

2019-10-15 Thread Derrick Stolee via GitGitGadget
V4 UPDATE: Rebased on latest master to include ew/hashmap and ds/include-exclude in the base. This series makes the sparse-checkout feature more user-friendly. While there, I also present a way to use a limited set of patterns to gain a significant performance boost in very large repositories. Sp

[PATCH v4 04/17] sparse-checkout: 'set' subcommand

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns as arguments and writes them to the sparse-checkout file. Then, it updates the working directory using 'git read-tree -mu HEAD'. The 'set' subcommand will replace the entire contents of the sparse-checkout fil

[PATCH v4 03/17] clone: add --sparse mode

2019-10-15 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When someone wants to clone a large repository, but plans to work using a sparse-checkout file, they either need to do a full checkout first and then reduce the patterns they included, or clone with --no-checkout, set up their patterns, and then run a checkout manually. This

[PATCH v3 14/17] sparse-checkout: sanitize for nested folders

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If a user provides folders A/ and A/B/ for inclusion in a cone-mode sparse-checkout file, the parsing logic will notice that A/ appears both as a "parent" type pattern and as a "recursive" type pattern. This is unexpected and hence will complain via a warning and revert to th

[PATCH v3 16/17] sparse-checkout: write using lockfile

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee If two 'git sparse-checkout set' subcommands are launched at the same time, the behavior can be unexpected as they compete to write the sparse-checkout file and update the working directory. Take a lockfile around the writes to the sparse-checkout file. In addition, acquire

[PATCH v3 17/17] sparse-checkout: cone mode should not interact with .gitignore

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee During the development of the sparse-checkout "cone mode" feature, an incorrect placement of the initializer for "use_cone_patterns = 1" caused warnings to show up when a .gitignore file was present with non-cone-mode patterns. This was fixed in the original commit introducin

[PATCH v3 11/17] unpack-trees: hash less in cone mode

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature in "cone mode" can use the fact that the recursive patterns are "connected" to the root via parent patterns to decide if a directory is entirely contained in the sparse-checkout or entirely removed. In these cases, we can skip hashing the paths wi

[PATCH v3 15/17] sparse-checkout: update working directory in-process

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout builtin used 'git read-tree -mu HEAD' to update the skip-worktree bits in the index and to update the working directory. This extra process is overly complex, and prone to failure. It also requires that we write our changes to the sparse-checkout file befo

[PATCH v3 12/17] unpack-trees: add progress to clear_ce_flags()

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When a large repository has many sparse-checkout patterns, the process for updating the skip-worktree bits can take long enough that a user gets confused why nothing is happening. Update the clear_ce_flags() method to write progress. Signed-off-by: Derrick Stolee --- cache

[PATCH v3 10/17] sparse-checkout: init and set in cone mode

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout [init|set]'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckoutCone=true'. When running 'git sparse-checkout set' in cone mode, a user only needs

[PATCH v3 13/17] read-tree: show progress by default

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The read-tree builtin has a --verbose option that signals to show progress and other data while updating the index. Update this to be on by default when stderr is a terminal window. This will help tools like 'git sparse-checkout' to automatically benefit from progress indica

[PATCH v3 06/17] sparse-checkout: create 'disable' subcommand

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The instructions for disabling a sparse-checkout to a full working directory are complicated and non-intuitive. Add a subcommand, 'git sparse-checkout disable', to perform those steps for the user. Signed-off-by: Derrick Stolee --- Documentation/git-sparse-checkout.txt | 2

[PATCH v3 09/17] sparse-checkout: use hashmaps for cone patterns

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The parent and recursive patterns allowed by the "cone mode" option in sparse-checkout are restrictive enough that we can avoid using the regex parsing. Everything is based on prefix matches, so we can use hashsets to store the prefixes from the sparse-checkout file. When che

[PATCH v3 05/17] sparse-checkout: add '--stdin' option to set subcommand

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns and places them in the sparse-checkout file. Then, it updates the working directory to match those patterns. For a large list of patterns, the command-line call can get very cumbersome. Add a '--stdin' option

[PATCH v3 00/17] New sparse-checkout builtin and "cone" mode

2019-10-07 Thread Derrick Stolee via GitGitGadget
This series makes the sparse-checkout feature more user-friendly. While there, I also present a way to use a limited set of patterns to gain a significant performance boost in very large repositories. Sparse-checkout is only documented as a subsection of the read-tree docs [1], which makes the fea

[PATCH v3 08/17] sparse-checkout: add 'cone' mode

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new Boolean config option, core.sparseCheckoutCone, to

[PATCH v3 04/17] sparse-checkout: 'set' subcommand

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns as arguments and writes them to the sparse-checkout file. Then, it updates the working directory using 'git read-tree -mu HEAD'. The 'set' subcommand will replace the entire contents of the sparse-checkout fil

[PATCH v3 03/17] clone: add --sparse mode

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When someone wants to clone a large repository, but plans to work using a sparse-checkout file, they either need to do a full checkout first and then reduce the patterns they included, or clone with --no-checkout, set up their patterns, and then run a checkout manually. This

[PATCH v3 02/17] sparse-checkout: create 'init' subcommand

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Getting started with a sparse-checkout file can be daunting. Help users start their sparse enlistment using 'git sparse-checkout init'. This will set 'core.sparseCheckout=true' in their config, write an initial set of patterns to the sparse-checkout file, and update their wor

[PATCH v3 01/17] sparse-checkout: create builtin with 'list' subcommand

2019-10-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature is mostly hidden to users, as its only documentation is supplementary information in the docs for 'git read-tree'. In addition, users need to know how to edit the .git/info/sparse-checkout file with the right patterns, then run the appropriate 'git

[PATCH v2 04/11] sparse-checkout: 'set' subcommand

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns as arguments and writes them to the sparse-checkout file. Then, it updates the working directory using 'git read-tree -mu HEAD'. The 'set' subcommand will replace the entire contents of the sparse-checkout fil

[PATCH v2 00/11] New sparse-checkout builtin and "cone" mode

2019-09-19 Thread Derrick Stolee via GitGitGadget
This series makes the sparse-checkout feature more user-friendly. While there, I also present a way to use a limited set of patterns to gain a significant performance boost in very large repositories. Sparse-checkout is only documented as a subsection of the read-tree docs [1], which makes the fea

[PATCH v2 08/11] sparse-checkout: add 'cone' mode

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new Boolean config option, core.sparseCheckoutCone, to

[PATCH v2 09/11] sparse-checkout: use hashmaps for cone patterns

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The parent and recursive patterns allowed by the "cone mode" option in sparse-checkout are restrictive enough that we can avoid using the regex parsing. Everything is based on prefix matches, so we can use hashsets to store the prefixes from the sparse-checkout file. When che

[PATCH v2 05/11] sparse-checkout: add '--stdin' option to set subcommand

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout set' subcommand takes a list of patterns and places them in the sparse-checkout file. Then, it updates the working directory to match those patterns. For a large list of patterns, the command-line call can get very cumbersome. Add a '--stdin' option

[PATCH v2 10/11] sparse-checkout: init and set in cone mode

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout [init|set]'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckoutCone=true'. When running 'git sparse-checkout set' in cone mode, a user only needs

[PATCH v2 06/11] sparse-checkout: create 'disable' subcommand

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The instructions for disabling a sparse-checkout to a full working directory are complicated and non-intuitive. Add a subcommand, 'git sparse-checkout disable', to perform those steps for the user. Signed-off-by: Derrick Stolee --- Documentation/git-sparse-checkout.txt | 2

[PATCH v2 01/11] sparse-checkout: create builtin with 'list' subcommand

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature is mostly hidden to users, as its only documentation is supplementary information in the docs for 'git read-tree'. In addition, users need to know how to edit the .git/info/sparse-checkout file with the right patterns, then run the appropriate 'git

[PATCH v2 11/11] unpack-trees: hash less in cone mode

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature in "cone mode" can use the fact that the recursive patterns are "connected" to the root via parent patterns to decide if a directory is entirely contained in the sparse-checkout or entirely removed. In these cases, we can skip hashing the paths wi

[PATCH v2 02/11] sparse-checkout: create 'init' subcommand

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Getting started with a sparse-checkout file can be daunting. Help users start their sparse enlistment using 'git sparse-checkout init'. This will set 'core.sparseCheckout=true' in their config, write an initial set of patterns to the sparse-checkout file, and update their wor

[PATCH v2 03/11] clone: add --sparse mode

2019-09-19 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When someone wants to clone a large repository, but plans to work using a sparse-checkout file, they either need to do a full checkout first and then reduce the patterns they included, or clone with --no-checkout, set up their patterns, and then run a checkout manually. This

[PATCH 5/5] unpack-trees: rename 'is_excluded_from_list()'

2019-09-03 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The first consumer of pattern-matching filenames was the .gitignore feature. In that context, storing a list of patterns as a 'struct exclude_list' makes sense. However, the sparse-checkout feature then adopted these structures and methods, but with the opposite meaning: the

[PATCH 0/5] Refactor excludes library

2019-09-03 Thread Derrick Stolee via GitGitGadget
The exclude library defined in dir.h was originally written for the .gitignore feature, but has since been used for .gitattributes and sparse-checkout. In the later applications, these patterns are used for inclusion rather than exclusion, so the name is confusing. This gets particularly bad when

[PATCH 1/5] treewide: rename 'struct exclude' to 'struct path_pattern'

2019-09-03 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The first consumer of pattern-matching filenames was the .gitignore feature. In that context, storing a list of patterns as a list of 'struct exclude' items makes sense. However, the sparse-checkout feature then adopted these structures and methods, but with the opposite mean

[PATCH 4/5] treewide: rename 'exclude' methods to 'pattern'

2019-09-03 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The first consumer of pattern-matching filenames was the .gitignore feature. In that context, storing a list of patterns as a 'struct exclude_list' makes sense. However, the sparse-checkout feature then adopted these structures and methods, but with the opposite meaning: the

[PATCH 3/5] treewide: rename 'EXCL_FLAG_' to 'PATTERN_FLAG_'

2019-09-03 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The first consumer of pattern-matching filenames was the .gitignore feature. In that context, storing a list of patterns as a 'struct exclude_list' makes sense. However, the sparse-checkout feature then adopted these structures and methods, but with the opposite meaning: the

[PATCH 2/5] treewide: rename 'struct exclude_list' to 'struct pattern_list'

2019-09-03 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The first consumer of pattern-matching filenames was the .gitignore feature. In that context, storing a list of patterns as a 'struct exclude_list' makes sense. However, the sparse-checkout feature then adopted these structures and methods, but with the opposite meaning: the

[PATCH 0/1] Write commit-graph on fetch

2019-09-02 Thread Derrick Stolee via GitGitGadget
Instead of waiting for a non-trivial GC command to write the commit-graph, write one during 'git fetch'. By using the equivalent method for 'git commit-graph write --split --reachable', we create a commit-graph chain that includes all reachable commits. Most of the time, these writes only add the n

[PATCH 1/1] fetch: add fetch.writeCommitGraph config setting

2019-09-02 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The commit-graph feature is now on by default, and is being written during 'git gc' by default. Typically, Git only writes a commit-graph when a 'git gc --auto' command passes the gc.auto setting to actualy do work. This means that a commit-graph will typically fall behind th

[PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git switch' command was created to separate half of the behavior of 'git checkout'. It specifically has the mode to do nothing with the index and working directory if the user only specifies to create a new branch and change HEAD to that branch. This is also the behavior

[PATCH 0/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Derrick Stolee via GitGitGadget
This series replaces "[RFC] Revert/delay performance regression in 'git checkout -b'" [1]. The community response to that series seems to be: 1. 'git switch' is still experimental, so don't warn that users should adopt it right away. 2. 'git checkout -b ' should do the fast thing,

[PATCH 0/1] upload-pack: fix race condition in t5516

2019-08-27 Thread Derrick Stolee via GitGitGadget
This patch fixes a strange race condition that was hitting our PR builds on microsoft/git rather frequently. See [1] for an example. It was only happening on the MSVC builds, so somehow that compiler/platform combination was leading to this race condition happening more often than other platforms.

[PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-27 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement

[PATCH 2/2] DEPRECATION: warn about 'git checkout -b'

2019-08-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Recommend that users use 'git switch -c' instead. Signed-off-by: Derrick Stolee --- builtin/.checkout.c.swp | Bin 77824 -> 0 bytes builtin/checkout.c | 9 - 2 files changed, 8 insertions(+), 1 deletion(-) delete mode 100644 builtin/.checkout.c.swp diff --

[PATCH 1/2] Revert "switch: no worktree status unless real branch switch happens"

2019-08-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee This reverts commit 65f099b3988198f0fdf3ef7a21dc01c556d21fff, which removed logic for avoiding extra cost in "git checkout -b" in favor of the new "git switch -c". This will cause a performance issue for users in large repos. Signed-off-by: Derrick Stolee --- Documentation

[PATCH 0/2] [RFC] Revert/delay performance regression in 'git checkout -b'

2019-08-21 Thread Derrick Stolee via GitGitGadget
As we were integrating Git 2.23.0 into VFS for Git, we discovered that "git checkout -b new-branch" went from 0.3s to 10+s on the Windows OS repo. This was an intentional change when writing the "git switch" builtin. Here is the commit message for 65f099b ("switch: no worktree status unless real br

[PATCH 9/9] sparse-checkout: init and add in cone mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout [init|add]'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckout=cone'. When running 'git sparse-checkout add' in cone mode, a user only needs to

[PATCH 2/9] sparse-checkout: create 'init' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Getting started with a sparse-checkout file can be daunting. Help users start their sparse enlistment using 'git sparse-checkout init'. This will set 'core.sparseCheckout=true' in their config, write an initial set of patterns to the sparse-checkout file, and update their wor

[PATCH 4/9] sparse-checkout: 'add' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout add' subcommand takes a list of patterns over stdin and writes them to the sparse-checkout file. Then, it updates the working directory using 'git read-tree -mu HEAD'. Note: if a user adds a negative pattern that would lead to the removal of a non-em

[PATCH 0/9] [RFC] New sparse-checkout builtin and "cone" mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
This RFC includes a potential direction to make the sparse-checkout more user-friendly. While there, I also present a way to use a limited set of patterns to gain a significant performance boost in very large repositories. Sparse-checkout is only documented as a subsection of the read-tree docs [1

[PATCH 3/9] clone: add --sparse mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When someone wants to clone a large repository, but plans to work using a sparse-checkout file, they either need to do a full checkout first and then reduce the patterns they included, or clone with --no-checkout, set up their patterns, and then run a checkout manually. This

[PATCH 5/9] sparse-checkout: create 'disable' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The instructions for disabling a sparse-checkout to a full working directory are complicated and non-intuitive. Add a subcommand, 'git sparse-checkout disable', to perform those steps for the user. Signed-off-by: Derrick Stolee --- Documentation/git-sparse-checkout.txt | 2

[PATCH 8/9] sparse-checkout: use hashmaps for cone patterns

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The parent and recursive patterns allowed by the "cone mode" option in sparse-checkout are restrictive enough that we can avoid using the regex parsing. Everything is based on prefix matches, so we can use hashsets to store the prefixes from the sparse-checkout file. When che

[PATCH 7/9] sparse-checkout: add 'cone' mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new 'cone' mode for the core.sparseCheckout config opt

[PATCH 1/9] sparse-checkout: create builtin with 'list' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature is mostly hidden to users, as its only documentation is supplementary information in the docs for 'git read-tree'. In addition, users need to know how to edit the .git/info/sparse-checkout file with the right patterns, then run the appropriate 'git

[PATCH v4 3/6] commit-graph: turn on commit-graph by default

2019-08-13 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The commit-graph feature has seen a lot of activity in the past year or so since it was introduced. The feature is a critical performance enhancement for medium- to large-sized repos, and does not significantly hurt small repos. Change the defaults for core.commitGraph and g

[PATCH v4 1/6] repo-settings: consolidate some config settings

2019-08-13 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee There are a few important config settings that are not loaded during git_default_config. These are instead loaded on-demand. Centralize these config options to a single scan, and store all of the values in a repo_settings struct. The values for each setting are initialized a

[PATCH v4 2/6] t6501: use 'git gc' in quiet mode

2019-08-13 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee t6501-freshen-objects.sh sends the standard error from 'git gc' to a file and verifies that it is empty. This is intended as a way to ensure no warnings are written during the operation. However, as the commit-graph is added as a step to 'git gc', its progress will appear in

[PATCH v4 4/6] repo-settings: parse core.untrackedCache

2019-08-13 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The core.untrackedCache config setting is slightly complicated, so clarify its use and centralize its parsing into the repo settings. The default value is "keep" (returned as -1), which persists the untracked cache if it exists. If the value is set as "false" (returned as 0

[PATCH v4 5/6] repo-settings: create feature.manyFiles setting

2019-08-13 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The feature.manyFiles setting is suitable for repos with many files in the working directory. By setting index.version=4 and core.untrackedCache=true, commands such as 'git status' should improve. While adding this setting, modify the index version precedence tests to check

[PATCH v4 6/6] repo-settings: create feature.experimental setting

2019-08-13 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'feature.experimental' setting includes config options that are not committed to become defaults, but could use additional testing. Update the following config settings to take new defaults, and to use the repo_settings struct if not already using them: * 'pack.useSpars

  1   2   3   4   5   6   >