threads / discuss / 46152

'pu' broken at t5304 tonight

Subject: 'pu' broken at t5304 tonight

## tl;dr

5 messages between Jun 10, 2017 and Jun 12, 2017.

replies: 4people: 4as markdown or json

Junio C Hamano· Jun 10, 2017, 06:07 UTC · lore

I didn't check where it goes wrong. Here is a list of suspects, taken by

    $ git shortlog --no-merges pu@{8.hours}..pu
i.e. patches that weren't in pu before today's integration cycle.
Andreas Heiduk (1):
      doc: describe git svn init --ignore-refs
Brandon Williams (32):
      config: create config.h
      config: remove git_config_iter
      config: don't include config.h by default
      config: don't implicitly use gitdir
      setup: don't perform lazy initialization of repository state
      environment: remove namespace_len variable
      repository: introduce the repository object
      environment: place key repository state in the_repository
      environment: store worktree in the_repository
      setup: add comment indicating a hack
      config: read config from a repository object
      repository: add index_state to struct repo
      submodule-config: store the_submodule_cache in the_repository
      submodule: add repo_read_gitmodules
      submodule: convert is_submodule_initialized to work on a repository
      convert: convert get_cached_convert_stats_ascii to take an index
      convert: convert crlf_to_git to take an index
      convert: convert convert_to_git_filter_fd to take an index
      convert: convert convert_to_git to take an index
      convert: convert renormalize_buffer to take an index
      tree: convert read_tree to take an index parameter
      ls-files: convert overlay_tree_on_cache to take an index
      ls-files: convert write_eolinfo to take an index
      ls-files: convert show_killed_files to take an index
      ls-files: convert show_other_files to take an index
      ls-files: convert show_ru_info to take an index
      ls-files: convert ce_excluded to take an index
      ls-files: convert prune_cache to take an index
      ls-files: convert show_files to take an index
      ls-files: factor out debug info into a function
      ls-files: factor out tag calculation
      ls-files: use repository object
Jeff King (1):
      date: use localtime() for "-local" time formats
Johannes Schindelin (8):
      discover_git_directory(): avoid setting invalid git_dir
      config: report correct line number upon error
      help: use early config when autocorrecting aliases
      read_early_config(): optionally return the worktree's top-level directory
      t1308: relax the test verifying that empty alias values are disallowed
      t7006: demonstrate a problem with aliases in subdirectories
      alias_lookup(): optionally return top-level directory
      Use the early config machinery to expand aliases
Junio C Hamano (1):
      ### match next
Prathamesh Chavan (1):
      dir: create function count_slashes
SZEDER Gábor (5):
      revision.h: turn rev_info.early_output back into an unsigned int
      revision.c: stricter parsing of '--no-{min,max}-parents'
      revision.c: stricter parsing of '--early-output'
      revision.c: use skip_prefix() in handle_revision_opt()
      revision.c: use skip_prefix() in handle_revision_pseudo_opt()
Stefan Beller (1):
      t4005: modernize style and drop hard coded sha1
Kevin Daudt· Jun 10, 2017, 12:48 UTC · re: Junio C Hamano · lore

Re: 'pu' broken at t5304 tonight

On Sat, Jun 10, 2017 at 03:07:01PM +0900, Junio C Hamano wrote:
Show 73 quoted lines
> I didn't check where it goes wrong.  Here is a list of suspects,
> taken by
> 
>     $ git shortlog --no-merges pu@{8.hours}..pu
> 
> i.e. patches that weren't in pu before today's integration cycle.
> 
> Andreas Heiduk (1):
>       doc: describe git svn init --ignore-refs
> 
> Brandon Williams (32):
>       config: create config.h
>       config: remove git_config_iter
>       config: don't include config.h by default
>       config: don't implicitly use gitdir
>       setup: don't perform lazy initialization of repository state
>       environment: remove namespace_len variable
>       repository: introduce the repository object
>       environment: place key repository state in the_repository
>       environment: store worktree in the_repository
>       setup: add comment indicating a hack
>       config: read config from a repository object
>       repository: add index_state to struct repo
>       submodule-config: store the_submodule_cache in the_repository
>       submodule: add repo_read_gitmodules
>       submodule: convert is_submodule_initialized to work on a repository
>       convert: convert get_cached_convert_stats_ascii to take an index
>       convert: convert crlf_to_git to take an index
>       convert: convert convert_to_git_filter_fd to take an index
>       convert: convert convert_to_git to take an index
>       convert: convert renormalize_buffer to take an index
>       tree: convert read_tree to take an index parameter
>       ls-files: convert overlay_tree_on_cache to take an index
>       ls-files: convert write_eolinfo to take an index
>       ls-files: convert show_killed_files to take an index
>       ls-files: convert show_other_files to take an index
>       ls-files: convert show_ru_info to take an index
>       ls-files: convert ce_excluded to take an index
>       ls-files: convert prune_cache to take an index
>       ls-files: convert show_files to take an index
>       ls-files: factor out debug info into a function
>       ls-files: factor out tag calculation
>       ls-files: use repository object
> 
> Jeff King (1):
>       date: use localtime() for "-local" time formats
> 
> Johannes Schindelin (8):
>       discover_git_directory(): avoid setting invalid git_dir
>       config: report correct line number upon error
>       help: use early config when autocorrecting aliases
>       read_early_config(): optionally return the worktree's top-level directory
>       t1308: relax the test verifying that empty alias values are disallowed
>       t7006: demonstrate a problem with aliases in subdirectories
>       alias_lookup(): optionally return top-level directory
>       Use the early config machinery to expand aliases
> 
> Junio C Hamano (1):
>       ### match next
> 
> Prathamesh Chavan (1):
>       dir: create function count_slashes
> 
> SZEDER Gábor (5):
>       revision.h: turn rev_info.early_output back into an unsigned int
>       revision.c: stricter parsing of '--no-{min,max}-parents'
>       revision.c: stricter parsing of '--early-output'
>       revision.c: use skip_prefix() in handle_revision_opt()
>       revision.c: use skip_prefix() in handle_revision_pseudo_opt()
> 
> Stefan Beller (1):
>       t4005: modernize style and drop hard coded sha1
> 
For me, this bisects to the latest merge:

2047eebd3 (Merge branch 'bw/repo-object' into pu, 2017-06-10), but neither of the parent of the merge break this test, so it looks like it's because of an interaction between the repo-object topic and another topic.

Kevin Daudt· Jun 10, 2017, 19:05 UTC · re: Kevin Daudt · lore

Re: 'pu' broken at t5304 tonight

On Sat, Jun 10, 2017 at 02:48:36PM +0200, Kevin Daudt wrote:
Show 81 quoted lines
> On Sat, Jun 10, 2017 at 03:07:01PM +0900, Junio C Hamano wrote:
> > I didn't check where it goes wrong.  Here is a list of suspects,
> > taken by
> > 
> >     $ git shortlog --no-merges pu@{8.hours}..pu
> > 
> > i.e. patches that weren't in pu before today's integration cycle.
> > 
> > Andreas Heiduk (1):
> >       doc: describe git svn init --ignore-refs
> > 
> > Brandon Williams (32):
> >       config: create config.h
> >       config: remove git_config_iter
> >       config: don't include config.h by default
> >       config: don't implicitly use gitdir
> >       setup: don't perform lazy initialization of repository state
> >       environment: remove namespace_len variable
> >       repository: introduce the repository object
> >       environment: place key repository state in the_repository
> >       environment: store worktree in the_repository
> >       setup: add comment indicating a hack
> >       config: read config from a repository object
> >       repository: add index_state to struct repo
> >       submodule-config: store the_submodule_cache in the_repository
> >       submodule: add repo_read_gitmodules
> >       submodule: convert is_submodule_initialized to work on a repository
> >       convert: convert get_cached_convert_stats_ascii to take an index
> >       convert: convert crlf_to_git to take an index
> >       convert: convert convert_to_git_filter_fd to take an index
> >       convert: convert convert_to_git to take an index
> >       convert: convert renormalize_buffer to take an index
> >       tree: convert read_tree to take an index parameter
> >       ls-files: convert overlay_tree_on_cache to take an index
> >       ls-files: convert write_eolinfo to take an index
> >       ls-files: convert show_killed_files to take an index
> >       ls-files: convert show_other_files to take an index
> >       ls-files: convert show_ru_info to take an index
> >       ls-files: convert ce_excluded to take an index
> >       ls-files: convert prune_cache to take an index
> >       ls-files: convert show_files to take an index
> >       ls-files: factor out debug info into a function
> >       ls-files: factor out tag calculation
> >       ls-files: use repository object
> > 
> > Jeff King (1):
> >       date: use localtime() for "-local" time formats
> > 
> > Johannes Schindelin (8):
> >       discover_git_directory(): avoid setting invalid git_dir
> >       config: report correct line number upon error
> >       help: use early config when autocorrecting aliases
> >       read_early_config(): optionally return the worktree's top-level directory
> >       t1308: relax the test verifying that empty alias values are disallowed
> >       t7006: demonstrate a problem with aliases in subdirectories
> >       alias_lookup(): optionally return top-level directory
> >       Use the early config machinery to expand aliases
> > 
> > Junio C Hamano (1):
> >       ### match next
> > 
> > Prathamesh Chavan (1):
> >       dir: create function count_slashes
> > 
> > SZEDER Gábor (5):
> >       revision.h: turn rev_info.early_output back into an unsigned int
> >       revision.c: stricter parsing of '--no-{min,max}-parents'
> >       revision.c: stricter parsing of '--early-output'
> >       revision.c: use skip_prefix() in handle_revision_opt()
> >       revision.c: use skip_prefix() in handle_revision_pseudo_opt()
> > 
> > Stefan Beller (1):
> >       t4005: modernize style and drop hard coded sha1
> > 
> 
> For me, this bisects to the latest merge:
> 
> 2047eebd3 (Merge branch 'bw/repo-object' into pu, 2017-06-10), but
> neither of the parent of the merge break this test, so it looks like
> it's because of an interaction between the repo-object topic and another
> topic.

Merging the repo-object with different other topic branches reveals this topic to cause the bad interaction:

b56c91004 (Merge branch 'nd/prune-in-worktree' into pu, 2017-06-10)
Still investigating why it happens.
Christian Couder· Jun 11, 2017, 04:13 UTC · re: Kevin Daudt · lore

Re: 'pu' broken at t5304 tonight

On Sat, Jun 10, 2017 at 9:05 PM, Kevin Daudt <me@ikke.info> wrote:
> On Sat, Jun 10, 2017 at 02:48:36PM +0200, Kevin Daudt wrote:
Show 13 quoted lines
>> For me, this bisects to the latest merge:
>>
>> 2047eebd3 (Merge branch 'bw/repo-object' into pu, 2017-06-10), but
>> neither of the parent of the merge break this test, so it looks like
>> it's because of an interaction between the repo-object topic and another
>> topic.
>
> Merging the repo-object with different other topic branches reveals this
> topic to cause the bad interaction:
>
> b56c91004 (Merge branch 'nd/prune-in-worktree' into pu, 2017-06-10)
>
> Still investigating why it happens.

Yeah, 9570b25a97 (revision.c: --indexed-objects add objects from all worktrees, 2017-04-19) adds the following test to t5304-prune.sh but this fails if nd/prune-in-worktree is rebased on top of bw/repo-object:

test_expect_success 'prune: handle index in multiple worktrees' '
       git worktree add second-worktree &&
       echo "new blob for second-worktree" >second-worktree/blob &&
       git -C second-worktree add blob &&
       git prune --expire=now &&
       git -C second-worktree show :blob >actual &&
       test_cmp second-worktree/blob actual
'
Brandon Williams· Jun 12, 2017, 18:03 UTC · re: Christian Couder · lore

Re: 'pu' broken at t5304 tonight

On 06/11, Christian Couder wrote:
Show 30 quoted lines
> On Sat, Jun 10, 2017 at 9:05 PM, Kevin Daudt <me@ikke.info> wrote:
> > On Sat, Jun 10, 2017 at 02:48:36PM +0200, Kevin Daudt wrote:
> 
> >> For me, this bisects to the latest merge:
> >>
> >> 2047eebd3 (Merge branch 'bw/repo-object' into pu, 2017-06-10), but
> >> neither of the parent of the merge break this test, so it looks like
> >> it's because of an interaction between the repo-object topic and another
> >> topic.
> >
> > Merging the repo-object with different other topic branches reveals this
> > topic to cause the bad interaction:
> >
> > b56c91004 (Merge branch 'nd/prune-in-worktree' into pu, 2017-06-10)
> >
> > Still investigating why it happens.
> 
> Yeah, 9570b25a97 (revision.c: --indexed-objects add objects from all
> worktrees, 2017-04-19) adds the following test to t5304-prune.sh but
> this fails if nd/prune-in-worktree is rebased on top of
> bw/repo-object:
> 
> test_expect_success 'prune: handle index in multiple worktrees' '
>        git worktree add second-worktree &&
>        echo "new blob for second-worktree" >second-worktree/blob &&
>        git -C second-worktree add blob &&
>        git prune --expire=now &&
>        git -C second-worktree show :blob >actual &&
>        test_cmp second-worktree/blob actual
> '
I think I discovered what is going on here (and its mostly my fault :D).

(e7a6a3b15 revision.c: --indexed-objects add objects from all worktrees) queries each worktree's index to add object which are pending in the per-worktree index's. To do this is uses 'worktree_git_path' in order to construct a path to the worktree's index file. My series introduced a change to how 'adjust_git_path' functioned, instead of checking if the index file came from the environment before replacing with the result of 'get_index_file()', i change it to unconditionally do this replacing which breaks the ability to get a path to a worktree's index.

So this breakage is definitely my fault, but you would still run into this exact same issue if you had set 'GIT_INDEX_FILE' as no worktree's would be able to find their index files as they would be overridden by the envvar.

-- 
Brandon Williams

← back to recent threads