profile
viewpoint
Johannes Schindelin dscho @Microsoft @git-for-windows maintainer.

dscho/cpptasks 3

A git-svn fork of the ant-contrib package cpptasks

dscho/Arduino 2

open-source electronics prototyping platform

dscho/bioformats 1

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment (particularly UW-Madison LOCI and Glencoe Software). Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.

dscho/connectbot 1

ConnectBot development has moved back to Google Code! See http://connectbot.org/ for details!

dscho/action-tmate 0

Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.

dscho/active-cells-ij2 0

Active Cells for ImageJ2

dscho/angiotool 0

A trial to convert AngioTool ( https://ccrod.cancer.gov/confluence/display/ROB2/Home ) into a Fiji plugin

dscho/ASA 0

Advanced Sholl Analysis plugin for ImageJ

dscho/auth-app.js 0

GitHub App authentication for JavaScript

Pull request review commentgitgitgadget/git

More index cleanups

 test_expect_success 'progress generates traces' ' 		"Working hard" <in 2>stderr &&

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> Most test cases can verify Git's behavior using input/output
> expectations or changes to the .git directory. However, sometimes we
> want to check that Git did or did not run a certain section of code.
> This is particularly important for performance-only features that we
> want to ensure have been enabled in certain cases.
>
> Add a new 'test_region' function that checks if a trace2 region was
> entered and left in a given trace2 event log.

Ooh, others do this too?  Sounds like a helpful function to add, but
just checking for entered and left means that...

>
> There is one existing test (t0500-progress-display.sh) that performs
> this check already, so use the helper function instead. More uses will
> be added in a later change.
>
> t6423-merge-rename-directories.sh also greps for region_enter lines, but
> it verifies the number of such lines, which is not the same as an
> existence check.

...yeah, won't cover the case that I added.  That's fine, since it
appears to be a one-off for now and we don't know of any other cases,
current or planned, that want to do something like that yet.

>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  t/t0500-progress-display.sh |  3 +--
>  t/test-lib-functions.sh     | 40 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+), 2 deletions(-)
>
> diff --git a/t/t0500-progress-display.sh b/t/t0500-progress-display.sh
> index 1ed1df351cb..c461b89dfaf 100755
> --- a/t/t0500-progress-display.sh
> +++ b/t/t0500-progress-display.sh
> @@ -303,8 +303,7 @@ test_expect_success 'progress generates traces' '
>                 "Working hard" <in 2>stderr &&
>
>         # t0212/parse_events.perl intentionally omits regions and data.
> -       grep -e "region_enter" -e "\"category\":\"progress\"" trace.event &&
> -       grep -e "region_leave" -e "\"category\":\"progress\"" trace.event &&
> +       test_region category progress trace.event &&

Sidenote: Hmm...about 40% of my region labels in merge-ort.c and 90%
in diffcore-rename.c have spaces in them.  This function could still
be used, but I'm curious if I should change the labels (but then
again, they are testing logical regions rather than individual
functions, and the spaces instead of underscores kind of convey
that...)

>         grep "\"key\":\"total_objects\",\"value\":\"40\"" trace.event &&
>         grep "\"key\":\"total_bytes\",\"value\":\"409600\"" trace.event
>  '
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> index 999982fe4a9..c878db93013 100644
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -1655,3 +1655,43 @@ test_subcommand () {
>                 grep "\[$expr\]"
>         fi
>  }
> +
> +# Check that the given command was invoked as part of the
> +# trace2-format trace on stdin.
> +#
> +#      test_region [!] <category> <label> git <command> <args>...
> +#
> +# For example, to look for trace2_region_enter("index", "do_read_index", repo)
> +# in an invocation of "git checkout HEAD~1", run
> +#
> +#      GIT_TRACE2_EVENT="$(pwd)/trace.txt" GIT_TRACE2_EVENT_NESTING=10 \
> +#              git checkout HEAD~1 &&
> +#      test_region index do_read_index <trace.txt
> +#
> +# If the first parameter passed is !, this instead checks that
> +# the given region was not entered.
> +#
> +test_region () {
> +       local expect_exit=0
> +       if test "$1" = "!"
> +       then
> +               expect_exit=1
> +               shift
> +       fi
> +
> +       grep -e "region_enter" -e "\"category\":\"$1\",\"label\":\"$2\"" "$3"
> +       exitcode=$?
> +
> +       if test $exitcode != $expect_exit
> +       then
> +               return 1
> +       fi
> +
> +       grep -e "region_leave" -e "\"category\":\"$1\",\"label\":\"$2\"" "$3"
> +       exitcode=$?
> +
> +       if test $exitcode != $expect_exit
> +       then
> +               return 1
> +       fi
> +}
> --
> gitgitgadget

This patch looks good to me.
derrickstolee

comment created time in 40 minutes

Pull request review commentgitgitgadget/git

More index cleanups

 static char const * const builtin_sparse_checkout_usage[] = { 	NULL

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> As we modify the sparse-checkout definition, we perform index operations
> on a pattern_list that only exists in-memory. This allows easy backing
> out in case the index update fails.
>
> However, if the index write itself cares about the sparse-checkout
> pattern set, we need access to that in-memory copy. Place a pointer to
> a 'struct pattern_list' in the index so we can access this on-demand.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  builtin/sparse-checkout.c | 17 ++++++++++-------
>  cache.h                   |  2 ++
>  2 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
> index 2306a9ad98e..e00b82af727 100644
> --- a/builtin/sparse-checkout.c
> +++ b/builtin/sparse-checkout.c
> @@ -110,6 +110,8 @@ static int update_working_directory(struct pattern_list *pl)
>         if (is_index_unborn(r->index))
>                 return UPDATE_SPARSITY_SUCCESS;
>
> +       r->index->sparse_checkout_patterns = pl;
> +
>         memset(&o, 0, sizeof(o));
>         o.verbose_update = isatty(2);
>         o.update = 1;
> @@ -138,6 +140,7 @@ static int update_working_directory(struct pattern_list *pl)
>         else
>                 rollback_lock_file(&lock_file);
>
> +       r->index->sparse_checkout_patterns = NULL;
>         return result;

The setting back to NULL made me curious; we don't want this
information to remain available later?  Is it only going to be used
for the updating of the working directory?

I dug a bit into the callers, and didn't find the answer to my
question...but I did notice that modify_pattern_list() will correctly
free the patterns after write_patterns_and_update() via calling
clear_pattern_list(&pl), but sparse_checkout_init() appears to leak
the patterns it allocates.  That's a separate issue from this patch,
but do you want to fix that up while working in this area (so I avoid
stepping on your toes with all your other patches)?

>  }
>
> @@ -517,19 +520,18 @@ static int modify_pattern_list(int argc, const char **argv, enum modify_type m)
>  {
>         int result;
>         int changed_config = 0;
> -       struct pattern_list pl;
> -       memset(&pl, 0, sizeof(pl));
> +       struct pattern_list *pl = xcalloc(1, sizeof(*pl));
>
>         switch (m) {
>         case ADD:
>                 if (core_sparse_checkout_cone)
> -                       add_patterns_cone_mode(argc, argv, &pl);
> +                       add_patterns_cone_mode(argc, argv, pl);
>                 else
> -                       add_patterns_literal(argc, argv, &pl);
> +                       add_patterns_literal(argc, argv, pl);
>                 break;
>
>         case REPLACE:
> -               add_patterns_from_input(&pl, argc, argv);
> +               add_patterns_from_input(pl, argc, argv);

Slightly annoying that the other functions are (argc, argv, pl) and
this one is (pl, argc, argv).  But again, that's outside the scope of
this patch and might not be worth the churn to fix.

>                 break;
>         }
>
> @@ -539,12 +541,13 @@ static int modify_pattern_list(int argc, const char **argv, enum modify_type m)
>                 changed_config = 1;
>         }
>
> -       result = write_patterns_and_update(&pl);
> +       result = write_patterns_and_update(pl);
>
>         if (result && changed_config)
>                 set_config(MODE_NO_PATTERNS);
>
> -       clear_pattern_list(&pl);
> +       clear_pattern_list(pl);
> +       free(pl);
>         return result;
>  }
>
> diff --git a/cache.h b/cache.h
> index f9c7a603841..bf4ec3de4b0 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -305,6 +305,7 @@ static inline unsigned int canon_mode(unsigned int mode)
>  struct split_index;
>  struct untracked_cache;
>  struct progress;
> +struct pattern_list;
>
>  struct index_state {
>         struct cache_entry **cache;
> @@ -329,6 +330,7 @@ struct index_state {
>         struct mem_pool *ce_mem_pool;
>         struct progress *progress;
>         struct repository *repo;
> +       struct pattern_list *sparse_checkout_patterns;
>  };
>
>  /* Name hashing */
> --
> gitgitgadget

Otherwise, this patch looks good to me.
derrickstolee

comment created time in an hour

Pull request review commentgitgitgadget/git

More index cleanups

 static char const * const builtin_sparse_checkout_usage[] = { 	NULL

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> A future feature will want to load the sparse-checkout patterns into a
> pattern_list, but the current mechanism to do so is a bit complicated.
> This is made difficult due to needing to find the sparse-checkout file
> in different ways throughout the codebase.
>
> The logic implemented in the new get_sparse_checkout_patterns() was
> duplicated in populate_from_existing_patterns() in unpack-trees.c. Use
> the new method instead, keeping the logic around handling the struct
> unpack_trees_options.
>
> The callers to get_sparse_checkout_filename() in
> builtin/sparse-checkout.c manipulate the sparse-checkout file directly,
> so it is not appropriate to replace logic in that file with
> get_sparse_checkout_patterns().
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  builtin/sparse-checkout.c |  5 -----
>  dir.c                     | 17 +++++++++++++++++
>  dir.h                     |  2 ++
>  unpack-trees.c            |  6 +-----
>  4 files changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
> index e3140db2a0a..2306a9ad98e 100644
> --- a/builtin/sparse-checkout.c
> +++ b/builtin/sparse-checkout.c
> @@ -22,11 +22,6 @@ static char const * const builtin_sparse_checkout_usage[] = {
>         NULL
>  };
>
> -static char *get_sparse_checkout_filename(void)
> -{
> -       return git_pathdup("info/sparse-checkout");
> -}
> -
>  static void write_patterns_to_file(FILE *fp, struct pattern_list *pl)
>  {
>         int i;
> diff --git a/dir.c b/dir.c
> index d637461da5c..d153a63bbd1 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -2998,6 +2998,23 @@ void setup_standard_excludes(struct dir_struct *dir)
>         }
>  }
>
> +char *get_sparse_checkout_filename(void)
> +{
> +       return git_pathdup("info/sparse-checkout");
> +}
> +
> +int get_sparse_checkout_patterns(struct pattern_list *pl)
> +{
> +       int res;
> +       char *sparse_filename = get_sparse_checkout_filename();
> +
> +       pl->use_cone_patterns = core_sparse_checkout_cone;
> +       res = add_patterns_from_file_to_list(sparse_filename, "", 0, pl, NULL);
> +
> +       free(sparse_filename);
> +       return res;
> +}
> +
>  int remove_path(const char *name)
>  {
>         char *slash;
> diff --git a/dir.h b/dir.h
> index a3c40dec516..facfae47402 100644
> --- a/dir.h
> +++ b/dir.h
> @@ -448,6 +448,8 @@ int is_empty_dir(const char *dir);
>
>  void setup_standard_excludes(struct dir_struct *dir);
>
> +char *get_sparse_checkout_filename(void);
> +int get_sparse_checkout_patterns(struct pattern_list *pl);
>
>  /* Constants for remove_dir_recursively: */
>
> diff --git a/unpack-trees.c b/unpack-trees.c
> index af6e9b9c2fd..837b8bb42fb 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -1549,14 +1549,10 @@ static void mark_new_skip_worktree(struct pattern_list *pl,
>  static void populate_from_existing_patterns(struct unpack_trees_options *o,
>                                             struct pattern_list *pl)
>  {
> -       char *sparse = git_pathdup("info/sparse-checkout");
> -
> -       pl->use_cone_patterns = core_sparse_checkout_cone;
> -       if (add_patterns_from_file_to_list(sparse, "", 0, pl, NULL) < 0)
> +       if (get_sparse_checkout_patterns(pl) < 0)
>                 o->skip_sparse_checkout = 1;
>         else
>                 o->pl = pl;
> -       free(sparse);
>  }
>
>
> --
> gitgitgadget

Looks straightforward and well motivated to me.

But the cherry on top that really sells this patch is that more lines
of dir.c will blame to someone besides me.  Win-win!
derrickstolee

comment created time in an hour

Pull request review commentgitgitgadget/git

More index cleanups

  */

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> The lazy_init_name_hash() populates a hashset with all filenames and
> another with all directories represented in the index. This is run only
> if we need to use the hashsets to check for existence or case-folding
> renames.
>
> Place trace2 regions where there is already a performance trace.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  name-hash.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/name-hash.c b/name-hash.c
> index 5d3c7b12c18..4e03fac9bb1 100644
> --- a/name-hash.c
> +++ b/name-hash.c
> @@ -7,6 +7,7 @@
>   */
>  #include "cache.h"
>  #include "thread-utils.h"
> +#include "trace2.h"
>
>  struct dir_entry {
>         struct hashmap_entry ent;
> @@ -577,6 +578,7 @@ static void lazy_init_name_hash(struct index_state *istate)
>         if (istate->name_hash_initialized)
>                 return;
>         trace_performance_enter();
> +       trace2_region_enter("index", "name-hash-init", istate->repo);
>         hashmap_init(&istate->name_hash, cache_entry_cmp, NULL, istate->cache_nr);
>         hashmap_init(&istate->dir_hash, dir_entry_cmp, NULL, istate->cache_nr);
>
> @@ -597,6 +599,7 @@ static void lazy_init_name_hash(struct index_state *istate)
>         }
>
>         istate->name_hash_initialized = 1;
> +       trace2_region_leave("index", "name-hash-init", istate->repo);
>         trace_performance_leave("initialize name hash");
>  }
>
> --
> gitgitgadget

Yaay for trace2.  :-)

Total sidenote: Are we ever going to get rid of the trace1 stuff?  I'm
sure this was discussed somewhere, but I don't know where.
derrickstolee

comment created time in an hour

Pull request review commentgitgitgadget/git

More index cleanups

 struct index_state { 	struct ewah_bitmap *fsmonitor_dirty;

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> It will be helpful to add behavior to index opertations that might

s/opertations/operations/

> trigger an object lookup. Since each index belongs to a specific
> repository, add a 'repo' pointer to struct index_state that allows
> access to this repository.
>
> This will prevent future changes from needing to pass an additional
> 'struct repository *repo' parameter and instead rely only on the 'struct
> index_state *istate' parameter.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  cache.h      | 1 +
>  repository.c | 4 ++++
>  2 files changed, 5 insertions(+)
>
> diff --git a/cache.h b/cache.h
> index 71097657489..f9c7a603841 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -328,6 +328,7 @@ struct index_state {
>         struct ewah_bitmap *fsmonitor_dirty;
>         struct mem_pool *ce_mem_pool;
>         struct progress *progress;
> +       struct repository *repo;
>  };
>
>  /* Name hashing */
> diff --git a/repository.c b/repository.c
> index a4174ddb062..67a4c1da2d9 100644
> --- a/repository.c
> +++ b/repository.c
> @@ -264,6 +264,10 @@ int repo_read_index(struct repository *repo)
>         if (!repo->index)
>                 repo->index = xcalloc(1, sizeof(*repo->index));
>
> +       /* Complete the double-reference */
> +       if (!repo->index->repo)
> +               repo->index->repo = repo;
> +
>         return read_index_from(repo->index, repo->index_file, repo->gitdir);
>  }
>
> --
> gitgitgadget

Since we have repo->index and we have index->repo, which are intended
to be circular...what if they aren't?  Do we want or need to add
assertions anywhere that repo == repo->index->repo or that index ==
index->repo->index ?

My initial implementations of --remerge-diff[1] played around with
creating a second repo, with a different primary object store but
everything else the same.  The index for the two repository objects
was thus the same, and thus clearly would have violated this assumed
invariant for one of the two repos.  I discarded that initial
implementation (which I didn't quite have working) because I
discovered tmp-objdir.h and was able to add some
tmp_objdir_make_primary() and tmp_objdir_remove_as_primary() functions
that merely altered the existing repo's primary object store, but I'm
curious if there might be other cases of folks doing stuff that might
have weird failures with this new invariant.

It's entirely possible that --remerge-diff was just so different, and
I was so unfamiliar with repo objects (and still kind of am) that I
was just doing weird stuff no one has done before, so perhaps no
additional checks are needed -- I'm just throwing my gut question out
there as food for thought.



[1] I have not yet submitted `--remerge-diff` to the list; you haven't
missed anything.  I'm waiting for merge-ort to be submitted, reviewed,
and merged first.  It's the remerge-diff branch in my fork on GitHub
if anyone is curious, though.
derrickstolee

comment created time in an hour

push eventscijava/status.scijava.org

Travis CI User

commit sha a31a84f4dd18921a0e33cf72790b177160e44259

Update component table (Travis build 1255)

view details

push time in an hour

Pull request review commentgitgitgadget/gitgitgadget

Add "new users" label to GitGitGadget PRs of first-time users

 {   "compilerOptions": {     /* Basic Options */-    "target": "es6",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */+    "target": "es2018",                       /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */

Should lib be updated in synch with target? Current recommendations for node 12 are in this repo. fyi, have been running with latest node without issues so we may want to consider updating the node version in package.json.

dscho

comment created time in an hour

Pull request review commentgitgitgadget/git

More index cleanups

 

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> The index has an fsmonitor_dirty bitmap that records which index entries
> are "dirty" based on the response from the FSMonitor. If this bitmap
> ever grows larger than the index, then there was an error in how it was
> constructed, and it was probably a developer's bug.
>
> There are several BUG() statements that are very similar, so replace
> these uses with a simpler assert_index_minimum(). Since there is one
> caller that uses a custom 'pos' value instead of the bit_size member, we
> cannot simplify it too much. However, the error string is identical in
> each, so this simplifies things.
>
> The end result is that the code is simpler to read while also preserving
> these assertions for developers in the FSMonitor space.

Indeed, looking through the patch, the end result is simpler to read.
Nice cleanup.

>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  fsmonitor.c | 27 +++++++++++++--------------
>  1 file changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/fsmonitor.c b/fsmonitor.c
> index ca031c3abb8..52a50a9545a 100644
> --- a/fsmonitor.c
> +++ b/fsmonitor.c
> @@ -13,14 +13,19 @@
>
>  struct trace_key trace_fsmonitor = TRACE_KEY_INIT(FSMONITOR);
>
> +static void assert_index_minimum(struct index_state *istate, size_t pos)
> +{
> +       if (pos > istate->cache_nr)
> +               BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
> +                   (uintmax_t)pos, istate->cache_nr);
> +}
> +
>  static void fsmonitor_ewah_callback(size_t pos, void *is)
>  {
>         struct index_state *istate = (struct index_state *)is;
>         struct cache_entry *ce;
>
> -       if (pos >= istate->cache_nr)
> -               BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" >= %u)",
> -                   (uintmax_t)pos, istate->cache_nr);
> +       assert_index_minimum(istate, pos);
>
>         ce = istate->cache[pos];
>         ce->ce_flags &= ~CE_FSMONITOR_VALID;
> @@ -82,10 +87,8 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
>         }
>         istate->fsmonitor_dirty = fsmonitor_dirty;
>
> -       if (!istate->split_index &&
> -           istate->fsmonitor_dirty->bit_size > istate->cache_nr)
> -               BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
> -                   (uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
> +       if (!istate->split_index)
> +               assert_index_minimum(istate, istate->fsmonitor_dirty->bit_size);
>
>         trace_printf_key(&trace_fsmonitor, "read fsmonitor extension successful");
>         return 0;
> @@ -110,10 +113,8 @@ void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)
>         uint32_t ewah_size = 0;
>         int fixup = 0;
>
> -       if (!istate->split_index &&
> -           istate->fsmonitor_dirty->bit_size > istate->cache_nr)
> -               BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
> -                   (uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
> +       if (!istate->split_index)
> +               assert_index_minimum(istate, istate->fsmonitor_dirty->bit_size);
>
>         put_be32(&hdr_version, INDEX_EXTENSION_VERSION2);
>         strbuf_add(sb, &hdr_version, sizeof(uint32_t));
> @@ -335,9 +336,7 @@ void tweak_fsmonitor(struct index_state *istate)
>                         }
>
>                         /* Mark all previously saved entries as dirty */
> -                       if (istate->fsmonitor_dirty->bit_size > istate->cache_nr)
> -                               BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
> -                                   (uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
> +                       assert_index_minimum(istate, istate->fsmonitor_dirty->bit_size);
>                         ewah_each_bit(istate->fsmonitor_dirty, fsmonitor_ewah_callback, istate);
>
>                         refresh_fsmonitor(istate);
> --
> gitgitgadget
>
derrickstolee

comment created time in 2 hours

Pull request review commentgitgitgadget/git

More index cleanups

 static int subtree_name_cmp(const char *one, int onelen, 	return memcmp(one, two, onelen);

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> This method will be helpful to use outside of cache-tree.c in a later
> feature. The implementation is subtle due to subtree_name_cmp() sorting
> by length and then lexicographically.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  cache-tree.c | 6 +++---
>  cache-tree.h | 2 ++
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/cache-tree.c b/cache-tree.c
> index c1e49901c17..2b130dd5e19 100644
> --- a/cache-tree.c
> +++ b/cache-tree.c
> @@ -45,7 +45,7 @@ static int subtree_name_cmp(const char *one, int onelen,
>         return memcmp(one, two, onelen);
>  }
>
> -static int subtree_pos(struct cache_tree *it, const char *path, int pathlen)
> +int cache_tree_subtree_pos(struct cache_tree *it, const char *path, int pathlen)
>  {
>         struct cache_tree_sub **down = it->down;
>         int lo, hi;
> @@ -72,7 +72,7 @@ static struct cache_tree_sub *find_subtree(struct cache_tree *it,
>                                            int create)
>  {
>         struct cache_tree_sub *down;
> -       int pos = subtree_pos(it, path, pathlen);
> +       int pos = cache_tree_subtree_pos(it, path, pathlen);
>         if (0 <= pos)
>                 return it->down[pos];
>         if (!create)
> @@ -123,7 +123,7 @@ static int do_invalidate_path(struct cache_tree *it, const char *path)
>         it->entry_count = -1;
>         if (!*slash) {
>                 int pos;
> -               pos = subtree_pos(it, path, namelen);
> +               pos = cache_tree_subtree_pos(it, path, namelen);
>                 if (0 <= pos) {
>                         cache_tree_free(&it->down[pos]->cache_tree);
>                         free(it->down[pos]);
> diff --git a/cache-tree.h b/cache-tree.h
> index 639bfa5340e..8efeccebfc9 100644
> --- a/cache-tree.h
> +++ b/cache-tree.h
> @@ -27,6 +27,8 @@ void cache_tree_free(struct cache_tree **);
>  void cache_tree_invalidate_path(struct index_state *, const char *);
>  struct cache_tree_sub *cache_tree_sub(struct cache_tree *, const char *);
>
> +int cache_tree_subtree_pos(struct cache_tree *it, const char *path, int pathlen);
> +
>  void cache_tree_write(struct strbuf *, struct cache_tree *root);
>  struct cache_tree *cache_tree_read(const char *buffer, unsigned long size);
>
> --
> gitgitgadget

Simple, straight-forward patch for exposing the function outside the
file scope; looks good.
derrickstolee

comment created time in 2 hours

Pull request review commentgitgitgadget/git

More index cleanups

 static int update_one(struct cache_tree *it, 

On the Git mailing list, Elijah Newren wrote (reply to this):

On Wed, Jan 20, 2021 at 8:54 AM Derrick Stolee via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> Make the method safer by allocating a cache_tree member for the given
> index_state if it is not already present.
>
> Also drop local variables that are used exactly once and can be found
> directly from the 'istate' parameter.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  cache-tree.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/cache-tree.c b/cache-tree.c
> index 3f1a8d4f1b7..c1e49901c17 100644
> --- a/cache-tree.c
> +++ b/cache-tree.c
> @@ -436,16 +436,20 @@ static int update_one(struct cache_tree *it,
>
>  int cache_tree_update(struct index_state *istate, int flags)
>  {
> -       struct cache_tree *it = istate->cache_tree;
> -       struct cache_entry **cache = istate->cache;
> -       int entries = istate->cache_nr;
> -       int skip, i = verify_cache(cache, entries, flags);
> +       int skip, i;
> +
> +       i = verify_cache(istate->cache, istate->cache_nr, flags);

All mechanical changes so far; these look obviously correct.

>
>         if (i)
>                 return i;
> +
> +       if (!istate->cache_tree)
> +               istate->cache_tree = cache_tree();

This is the only substantive change.  It seems fairly innocuous, but
it makes me wonder the reasoning...I don't know/remember enough about
cache_tree handling to know when this would or wouldn't have already
been allocated.  It seems that this would have had to segfault below
if istate->cache_tree were ever NULL, and I don't see you mentioning
any bug you are fixing, so I presume this means you are going to be
adding new codepaths somewhere that cause this function to be reached
under different circumstances than previously had been and you need it
to be more safe for those.  Is that correct?  Or is it just an
abundance of caution thing that you're adding?  If the latter, any
reason you chose to allocate one rather than assume it's a violation
of design invariants and BUG() instead?  (Perhaps the commit message
could add a sentence about the rationale for the extra safety?)

> +
>         trace_performance_enter();
>         trace2_region_enter("cache_tree", "update", the_repository);
> -       i = update_one(it, cache, entries, "", 0, &skip, flags);
> +       i = update_one(istate->cache_tree, istate->cache, istate->cache_nr,
> +                      "", 0, &skip, flags);

Another mechanical update; looks good.

>         trace2_region_leave("cache_tree", "update", the_repository);
>         trace_performance_leave("cache_tree_update");
>         if (i < 0)
> --
> gitgitgadget
derrickstolee

comment created time in 2 hours

created taggitgitgadget/git

tagpr-839/derrickstolee/more-index-cleanups-v1

GitGitGadget's Git fork. Open Pull Requests here to submit them to the Git mailing list

created time in 2 hours

pull request commentgitgitgadget/git

More index cleanups

Submitted as pull.839.git.1611161639.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git pr-839/derrickstolee/more-index-cleanups-v1

To fetch this version to local tag pr-839/derrickstolee/more-index-cleanups-v1:

git fetch --no-tags https://github.com/gitgitgadget/git tag pr-839/derrickstolee/more-index-cleanups-v1
derrickstolee

comment created time in 2 hours

pull request commentgitgitgadget/git

More index cleanups

/submit

derrickstolee

comment created time in 2 hours

PR opened gitgitgadget/git

More index cleanups

Thanks for taking the time to contribute to Git! Please be advised that the Git community does not use github.com for their contributions. Instead, we use a mailing list (git@vger.kernel.org) for code submissions, code reviews, and bug reports. Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/) to conveniently send your Pull Requests commits to our mailing list.

Please read the "guidelines for contributing" linked above!

+432 -41

0 comment

13 changed files

pr created time in 3 hours

delete branch dscho/gitgitgadget

delete branch : dependabot/npm_and_yarn/commander-7.0.0

delete time in 4 hours

PR closed dscho/gitgitgadget

build(deps): bump commander from 6.2.1 to 7.0.0 dependencies

Bumps commander from 6.2.1 to 7.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tj/commander.js/releases">commander's releases</a>.</em></p> <blockquote> <h2>v7.0.0</h2> <h3>Added</h3> <ul> <li><code>.enablePositionalOptions()</code> to let program and subcommand reuse same option (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.passThroughOptions()</code> to pass options through to other programs without needing <code>--</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.allowExcessArguments(false)</code> to show an error message if there are too many command-arguments on command line for the action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li><code>.configureOutput()</code> to modify use of stdout and stderr or customise display of errors (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1387">#1387</a>)</li> <li>use <code>.addHelpText()</code> to add text before or after the built-in help, for just current command or also for all subcommands (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>enhance Option class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1331">#1331</a>) <ul> <li>allow hiding options from help</li> <li>allow restricting option arguments to a list of choices</li> <li>allow setting how default value is shown in help</li> </ul> </li> <li><code>.createOption()</code> to support subclassing of automatically created options (like <code>.createCommand()</code>) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1380">#1380</a>)</li> <li>refactor the code generating the help into a separate public Help class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>support sorting subcommands and options in help</li> <li>support specifying wrap width (columns)</li> <li>allow subclassing Help class</li> <li>allow configuring Help class without subclassing</li> </ul> </li> </ul> <h3>Changed</h3> <ul> <li><em>Breaking:</em> options are stored safely by default, not as properties on the command (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>this especially affects accessing options on program, use <code>program.opts()</code></li> <li>revert behaviour with <code>.storeOptionsAsProperties()</code></li> </ul> </li> <li><em>Breaking:</em> action handlers are passed options and command separately (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li>deprecated callback parameter to <code>.help()</code> and <code>.outputHelp()</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li><em>Breaking:</em> errors now displayed using <code>process.stderr.write()</code> instead of <code>console.error()</code></li> <li>deprecate <code>.on('--help')</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>initialise the command description to empty string (previously undefined) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>)</li> <li>document and annotate deprecated routines (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1349">#1349</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>wrapping bugs in help (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>first line of command description was wrapping two characters early</li> <li>pad width calculation was not including help option and help command</li> <li>pad width calculation was including hidden options and commands</li> </ul> </li> <li>improve backwards compatibility for custom command event listeners (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1403">#1403</a>)</li> </ul> <h3>Deleted</h3> <ul> <li><em>Breaking:</em> <code>.passCommandToAction()</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>no longer needed as action handler is passed options and command</li> </ul> </li> <li><em>Breaking:</em> "extra arguments" parameter to action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>if being used to detect excess arguments, there is now an error available by setting <code>.allowExcessArguments(false)</code></li> </ul> </li> </ul> <h3>Migration Tips</h3> <p>The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tj/commander.js/blob/master/CHANGELOG.md">commander's changelog</a>.</em></p> <blockquote> <h2>[7.0.0] (2021-01-15)</h2> <h3>Added</h3> <ul> <li><code>.enablePositionalOptions()</code> to let program and subcommand reuse same option (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.passThroughOptions()</code> to pass options through to other programs without needing <code>--</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.allowExcessArguments(false)</code> to show an error message if there are too many command-arguments on command line for the action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li><code>.configureOutput()</code> to modify use of stdout and stderr or customise display of errors (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1387">#1387</a>)</li> <li>use <code>.addHelpText()</code> to add text before or after the built-in help, for just current command or also for all subcommands (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>enhance Option class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1331">#1331</a>) <ul> <li>allow hiding options from help</li> <li>allow restricting option arguments to a list of choices</li> <li>allow setting how default value is shown in help</li> </ul> </li> <li><code>.createOption()</code> to support subclassing of automatically created options (like <code>.createCommand()</code>) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1380">#1380</a>)</li> <li>refactor the code generating the help into a separate public Help class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>support sorting subcommands and options in help</li> <li>support specifying wrap width (columns)</li> <li>allow subclassing Help class</li> <li>allow configuring Help class without subclassing</li> </ul> </li> </ul> <h3>Changed</h3> <ul> <li><em>Breaking:</em> options are stored safely by default, not as properties on the command (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>this especially affects accessing options on program, use <code>program.opts()</code></li> <li>revert behaviour with <code>.storeOptionsAsProperties()</code></li> </ul> </li> <li><em>Breaking:</em> action handlers are passed options and command separately (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li>deprecated callback parameter to <code>.help()</code> and <code>.outputHelp()</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li><em>Breaking:</em> errors now displayed using <code>process.stderr.write()</code> instead of <code>console.error()</code></li> <li>deprecate <code>.on('--help')</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>initialise the command description to empty string (previously undefined) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>)</li> <li>document and annotate deprecated routines (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1349">#1349</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>wrapping bugs in help (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>first line of command description was wrapping two characters early</li> <li>pad width calculation was not including help option and help command</li> <li>pad width calculation was including hidden options and commands</li> </ul> </li> <li>improve backwards compatibility for custom command event listeners (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1403">#1403</a>)</li> </ul> <h3>Deleted</h3> <ul> <li><em>Breaking:</em> <code>.passCommandToAction()</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>no longer needed as action handler is passed options and command</li> </ul> </li> <li><em>Breaking:</em> "extra arguments" parameter to action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>if being used to detect excess arguments, there is now an error displayed by default</li> </ul> </li> </ul> <h3>Migration Tips</h3> <p>The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tj/commander.js/commit/034ad9f326ee2b26001b864adda5fea465ee148b"><code>034ad9f</code></a> Feature/prepare for 7 (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1436">#1436</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/182ee067532d39b4769ea298395ea7cf3112374c"><code>182ee06</code></a> Small addition to docs for new parameter</li> <li><a href="https://github.com/tj/commander.js/commit/fcc89885a5bdcf70a64de8858a9c526550989e7a"><code>fcc8988</code></a> ability to specify <code>minColumnWidth</code> for <code>Help.wrap</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1430">#1430</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/d9345731c1e85fdfe5fab643a806fc6a6d224029"><code>d934573</code></a> Update dependencies (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1432">#1432</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/891e23d491d1a399248889e865705efa969bb305"><code>891e23d</code></a> Test coverage (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1433">#1433</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/ff301fadca5ac155ce47a05b1a99aee9c8180285"><code>ff301fa</code></a> Feature/update chinese readme (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1431">#1431</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/e2670f428728e422efb2050a1262d822145b4bd1"><code>e2670f4</code></a> Make new excess arguments error opt-in (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1429">#1429</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/8ac84ec23c1d2a224e5d02f397b1042229840517"><code>8ac84ec</code></a> Positional options (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/1383870b761142519fccc244efbeb514db3f3edd"><code>1383870</code></a> Combine prerelease 7 versions together (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1418">#1418</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/d8faba2cfac635913abf264bca980ba21c94d185"><code>d8faba2</code></a> Increase test coverage, including incrementNodeInspectorPort (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1428">#1428</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tj/commander.js/compare/v6.2.1...v7.0.0">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+4 -4

1 comment

2 changed files

dependabot[bot]

pr closed time in 4 hours

pull request commentdscho/gitgitgadget

build(deps): bump commander from 6.2.1 to 7.0.0

Looks like commander is up-to-date now, so this is no longer needed.

dependabot[bot]

comment created time in 4 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

thx, just saw the /allow

michaelcompressconsult

comment created time in 5 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

anyone an idea how to fix the problem? i made my email public alredy...

michaelcompressconsult

comment created time in 5 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

User michaelcompressconsult is now allowed to use GitGitGadget.

WARNING: michaelcompressconsult has no public email address set on GitHub

michaelcompressconsult

comment created time in 5 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

Invalid author email in 45739d23d3f91d3d3f2ee48c4cf14f8841c233b7: "77733979+michaelcompressconsult@users.noreply.github.com"

michaelcompressconsult

comment created time in 5 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

Invalid author email in a9e8f8d5c37a18a0552d14a796dc6fad5e2731e1: "77733979+michaelcompressconsult@users.noreply.github.com"

michaelcompressconsult

comment created time in 5 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

Invalid author email in 133fadebcf23ad66c306c02e0eaccc07baacc672: "77733979+michaelcompressconsult@users.noreply.github.com"

michaelcompressconsult

comment created time in 5 hours

pull request commentgit/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

Welcome to GitGitGadget

Hi @michaelcompressconsult, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests.

Please make sure that your Pull Request has a good description, as it will be used as cover letter.

Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:

  • the lines should not exceed 76 columns,
  • the first line should be like a header and typically start with a prefix like "tests:" or "commit:", and
  • the commit messages' body should be describing the "why?" of the change.
  • Finally, the commit messages should end in a Signed-off-by: line matching the commits' author.

It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code.

Contributing the patches

Before you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a comment to your PR of the form /allow. A good way to find other contributors is to locate recent pull requests where someone has been /allowed:

Both the person who commented /allow and the PR author are able to /allow you.

An alternative is the channel #git-devel on the FreeNode IRC network:

<newcontributor> I've just created my first PR, could someone please /allow me? https://github.com/gitgitgadget/git/pull/12345
<veteran> newcontributor: it is done
<newcontributor> thanks!

Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment /submit.

If you want to see what email(s) would be sent for a /submit request, add a PR comment /preview to have the email(s) sent to you. You must have a public GitHub email address for this.

After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions (while the comments and suggestions will be mirrored into the PR by GitGitGadget, you will still want to reply via mail).

If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox from the Git mailing list archive (click the (raw) link), then import it into your mail program. If you use GMail, you can do this via:

curl -g --user "<EMailAddress>:<Password>" \
    --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt

To iterate on your change, i.e. send a revised patch or patch series, you will first want to (force-)push to the same branch. You probably also want to modify your Pull Request description (or title). It is a good idea to summarize the revision by adding something like this to the cover letter (read: by editing the first comment on the PR, i.e. the PR description):

Changes since v1:
- Fixed a typo in the commit message (found by ...)
- Added a code comment to ... as suggested by ...
...

To send a new iteration, just add another PR comment with the contents: /submit.

Need help?

New contributors who want advice are encouraged to join git-mentoring@googlegroups.com, where volunteers who regularly contribute to Git are willing to answer newbie questions, give advice, or otherwise provide mentoring to interested contributors. You must join in order to post or view messages, but anyone can join.

You may also be able to find help in real time in the developer IRC channel, #git-devel on Freenode. Remember that IRC does not support offline messaging, so if you send someone a private message and log out, they cannot respond to you. The scrollback of #git-devel is archived, though.

michaelcompressconsult

comment created time in 5 hours

PR opened git/git

mergetool: use mergetool_find_win32_cmd from git-mergetool--lib.sh to locate exe

kdiff3 works fine on windows - with the exception that it cannot be found because of git subsystem not searching windows environment.

Adding these 3 lines makes it work on windows using windows kdiff3 too. The 'which' should capture the unix/linux world.

Explicit set paths will cause this code not to be executed, see git/git-mergetool--lib.sh (Also noticed there but different issue: the code in is_available() does not consider git settings like get_merge_tool_path() does, so maybe the later should be called in is_available to get an accurate list of available tools?)

kdiff3 can be found here: http://kdiff3.sourceforge.net/

+4 -0

0 comment

1 changed file

pr created time in 5 hours

fork hinerm/TrakEM2

ImageJ plugin for morphological data mining, 3D modeling and image stitching, registration, editing and annotation.

https://imagej.net/TrakEM2

fork in 5 hours

issue commentgit-for-windows/git

uninstalling git and github

@usha-ui The uninstall has a short-name, and on my system is at C:\Program Files\Git\unins001.exe. Try that.

Maybe we need it to be called "uninstall.exe", or maybe a shortcut with that plain name.

usha-ui

comment created time in 5 hours

delete branch gitgitgadget/gitgitgadget

delete branch : dependabot/npm_and_yarn/commander-7.0.0

delete time in 7 hours

PR closed gitgitgadget/gitgitgadget

build(deps): bump commander from 6.2.1 to 7.0.0 dependencies

Bumps commander from 6.2.1 to 7.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tj/commander.js/releases">commander's releases</a>.</em></p> <blockquote> <h2>v7.0.0</h2> <h3>Added</h3> <ul> <li><code>.enablePositionalOptions()</code> to let program and subcommand reuse same option (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.passThroughOptions()</code> to pass options through to other programs without needing <code>--</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.allowExcessArguments(false)</code> to show an error message if there are too many command-arguments on command line for the action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li><code>.configureOutput()</code> to modify use of stdout and stderr or customise display of errors (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1387">#1387</a>)</li> <li>use <code>.addHelpText()</code> to add text before or after the built-in help, for just current command or also for all subcommands (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>enhance Option class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1331">#1331</a>) <ul> <li>allow hiding options from help</li> <li>allow restricting option arguments to a list of choices</li> <li>allow setting how default value is shown in help</li> </ul> </li> <li><code>.createOption()</code> to support subclassing of automatically created options (like <code>.createCommand()</code>) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1380">#1380</a>)</li> <li>refactor the code generating the help into a separate public Help class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>support sorting subcommands and options in help</li> <li>support specifying wrap width (columns)</li> <li>allow subclassing Help class</li> <li>allow configuring Help class without subclassing</li> </ul> </li> </ul> <h3>Changed</h3> <ul> <li><em>Breaking:</em> options are stored safely by default, not as properties on the command (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>this especially affects accessing options on program, use <code>program.opts()</code></li> <li>revert behaviour with <code>.storeOptionsAsProperties()</code></li> </ul> </li> <li><em>Breaking:</em> action handlers are passed options and command separately (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li>deprecated callback parameter to <code>.help()</code> and <code>.outputHelp()</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li><em>Breaking:</em> errors now displayed using <code>process.stderr.write()</code> instead of <code>console.error()</code></li> <li>deprecate <code>.on('--help')</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>initialise the command description to empty string (previously undefined) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>)</li> <li>document and annotate deprecated routines (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1349">#1349</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>wrapping bugs in help (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>first line of command description was wrapping two characters early</li> <li>pad width calculation was not including help option and help command</li> <li>pad width calculation was including hidden options and commands</li> </ul> </li> <li>improve backwards compatibility for custom command event listeners (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1403">#1403</a>)</li> </ul> <h3>Deleted</h3> <ul> <li><em>Breaking:</em> <code>.passCommandToAction()</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>no longer needed as action handler is passed options and command</li> </ul> </li> <li><em>Breaking:</em> "extra arguments" parameter to action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>if being used to detect excess arguments, there is now an error available by setting <code>.allowExcessArguments(false)</code></li> </ul> </li> </ul> <h3>Migration Tips</h3> <p>The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tj/commander.js/blob/master/CHANGELOG.md">commander's changelog</a>.</em></p> <blockquote> <h2>[7.0.0] (2021-01-15)</h2> <h3>Added</h3> <ul> <li><code>.enablePositionalOptions()</code> to let program and subcommand reuse same option (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.passThroughOptions()</code> to pass options through to other programs without needing <code>--</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><code>.allowExcessArguments(false)</code> to show an error message if there are too many command-arguments on command line for the action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li><code>.configureOutput()</code> to modify use of stdout and stderr or customise display of errors (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1387">#1387</a>)</li> <li>use <code>.addHelpText()</code> to add text before or after the built-in help, for just current command or also for all subcommands (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>enhance Option class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1331">#1331</a>) <ul> <li>allow hiding options from help</li> <li>allow restricting option arguments to a list of choices</li> <li>allow setting how default value is shown in help</li> </ul> </li> <li><code>.createOption()</code> to support subclassing of automatically created options (like <code>.createCommand()</code>) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1380">#1380</a>)</li> <li>refactor the code generating the help into a separate public Help class (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>support sorting subcommands and options in help</li> <li>support specifying wrap width (columns)</li> <li>allow subclassing Help class</li> <li>allow configuring Help class without subclassing</li> </ul> </li> </ul> <h3>Changed</h3> <ul> <li><em>Breaking:</em> options are stored safely by default, not as properties on the command (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>this especially affects accessing options on program, use <code>program.opts()</code></li> <li>revert behaviour with <code>.storeOptionsAsProperties()</code></li> </ul> </li> <li><em>Breaking:</em> action handlers are passed options and command separately (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>)</li> <li>deprecated callback parameter to <code>.help()</code> and <code>.outputHelp()</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li><em>Breaking:</em> errors now displayed using <code>process.stderr.write()</code> instead of <code>console.error()</code></li> <li>deprecate <code>.on('--help')</code> (removed from README) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1296">#1296</a>)</li> <li>initialise the command description to empty string (previously undefined) (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>)</li> <li>document and annotate deprecated routines (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1349">#1349</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>wrapping bugs in help (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1365">#1365</a>) <ul> <li>first line of command description was wrapping two characters early</li> <li>pad width calculation was not including help option and help command</li> <li>pad width calculation was including hidden options and commands</li> </ul> </li> <li>improve backwards compatibility for custom command event listeners (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1403">#1403</a>)</li> </ul> <h3>Deleted</h3> <ul> <li><em>Breaking:</em> <code>.passCommandToAction()</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>no longer needed as action handler is passed options and command</li> </ul> </li> <li><em>Breaking:</em> "extra arguments" parameter to action handler (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1409">#1409</a>) <ul> <li>if being used to detect excess arguments, there is now an error displayed by default</li> </ul> </li> </ul> <h3>Migration Tips</h3> <p>The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tj/commander.js/commit/034ad9f326ee2b26001b864adda5fea465ee148b"><code>034ad9f</code></a> Feature/prepare for 7 (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1436">#1436</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/182ee067532d39b4769ea298395ea7cf3112374c"><code>182ee06</code></a> Small addition to docs for new parameter</li> <li><a href="https://github.com/tj/commander.js/commit/fcc89885a5bdcf70a64de8858a9c526550989e7a"><code>fcc8988</code></a> ability to specify <code>minColumnWidth</code> for <code>Help.wrap</code> (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1430">#1430</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/d9345731c1e85fdfe5fab643a806fc6a6d224029"><code>d934573</code></a> Update dependencies (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1432">#1432</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/891e23d491d1a399248889e865705efa969bb305"><code>891e23d</code></a> Test coverage (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1433">#1433</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/ff301fadca5ac155ce47a05b1a99aee9c8180285"><code>ff301fa</code></a> Feature/update chinese readme (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1431">#1431</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/e2670f428728e422efb2050a1262d822145b4bd1"><code>e2670f4</code></a> Make new excess arguments error opt-in (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1429">#1429</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/8ac84ec23c1d2a224e5d02f397b1042229840517"><code>8ac84ec</code></a> Positional options (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1427">#1427</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/1383870b761142519fccc244efbeb514db3f3edd"><code>1383870</code></a> Combine prerelease 7 versions together (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1418">#1418</a>)</li> <li><a href="https://github.com/tj/commander.js/commit/d8faba2cfac635913abf264bca980ba21c94d185"><code>d8faba2</code></a> Increase test coverage, including incrementNodeInspectorPort (<a href="https://github-redirect.dependabot.com/tj/commander.js/issues/1428">#1428</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tj/commander.js/compare/v6.2.1...v7.0.0">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+4 -4

3 comments

2 changed files

dependabot[bot]

pr closed time in 7 hours

pull request commentgitgitgadget/gitgitgadget

build(deps): bump commander from 6.2.1 to 7.0.0

Looks like commander is up-to-date now, so this is no longer needed.

dependabot[bot]

comment created time in 7 hours

more