git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git fetch <remote> <branch> behaves weirdely when run in a worktree

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Sep 25, 2018, 18:44 UTC
Message-ID
<fa6d37b850177f7f2ba31c596d5986962eaf7382.camel@gmail.com>
In-Reply-To
<CACsJy8D_37U+4sb7tb8KqGM=_3CRrTaZX1ZE9VqDVrYJT-AhnA@mail.gmail.com>
On Mon, 2018-09-24 at 17:17 +0200, Duy Nguyen wrote:
Show 6 quoted lines
> On Sun, Sep 23, 2018 at 10:19 PM Kaartic Sivaraam
> <kaartic.sivaraam@gmail.com> wrote:
> 
> Yes, some bugs. It behaves correctly for me. There must be something
> strange that triggers this. What's your "git worktree list" (iow
> anything strange there, duplicate worktrees perhaps)?
Nothing seems strange in the list.

$ git worktree list $COMMON_ROOT/git 01d371f741 (detached HEAD) $COMMON_ROOT/git-next cfa73bbfcb (detached HEAD) $COMMON_ROOT/git-next-build-automate 01d371f741 (detached HEAD) $COMMON_ROOT/git-pu 363c5c06bb (detached HEAD)

Note: I sanitized the path in which the git worktrees (including the
main worktree) is present as $COMMON_ROOT.
>  Also please try
> "git fetch" again with GIT_TRACE=1 and GIT_TRACE_SETUP=1. Hopefully we
> could catch something with that.
$ GIT_TRACE_SETUP=1 GIT_TRACE=1 git fetch origin next
23:10:26.049785 trace.c:377             setup: git_dir: $COMMON_ROOT/git/.git/worktrees/git-next-build-automate
23:10:26.049868 trace.c:378             setup: git_common_dir: $COMMON_ROOT/git/.git
23:10:26.049901 trace.c:379             setup: worktree: $COMMON_ROOT/git-next-build-automate
23:10:26.049922 trace.c:380             setup: cwd: $COMMON_ROOT/git-next-build-automate
23:10:26.049941 trace.c:381             setup: prefix: (null)
23:10:26.049955 git.c:415               trace: built-in: git fetch origin next
23:10:26.051033 run-command.c:637       trace: run_command: git-remote-https origin https://github.com/git/git.git
23:10:28.366526 run-command.c:637       trace: run_command: git rev-list --objects --stdin --not --all --quiet
23:10:28.400979 run-command.c:637       trace: run_command: git rev-list --objects --stdin --not --all --quiet
23:10:28.402745 trace.c:377             setup: git_dir: $COMMON_ROOT/git/.git/worktrees/git-next-build-automate
23:10:28.402787 trace.c:378             setup: git_common_dir: $COMMON_ROOT/git/.git
23:10:28.402793 trace.c:379             setup: worktree: $COMMON_ROOT/git-next-build-automate
23:10:28.402798 trace.c:380             setup: cwd: $COMMON_ROOT/git-next-build-automate
23:10:28.402802 trace.c:381             setup: prefix: (null)
23:10:28.402815 git.c:415               trace: built-in: git rev-list --objects --stdin --not --all --quiet
From https://github.com/git/git
 * branch                  next       -> FETCH_HEAD
23:10:28.437350 run-command.c:1553      run_processes_parallel: preparing to run up to 1 tasks
23:10:28.437481 run-command.c:1585      run_processes_parallel: done
23:10:28.437763 run-command.c:637       trace: run_command: git gc --auto
23:10:28.439608 trace.c:377             setup: git_dir: $COMMON_ROOT/git/.git/worktrees/git-next-build-automate
23:10:28.439655 trace.c:378             setup: git_common_dir: $COMMON_ROOT/git/.git
23:10:28.439667 trace.c:379             setup: worktree: $COMMON_ROOT/git-next-build-automate
23:10:28.439677 trace.c:380             setup: cwd: $COMMON_ROOT/git-next-build-automate
23:10:28.439687 trace.c:381             setup: prefix: (null)
23:10:28.439699 git.c:415               trace: built-in: git gc --auto

HTH, Sivaraam

Previous: Duy NguyenNext: Junio C Hamano
Message 3 of 12 in “git fetch <remote> <branch> behaves weirdely when run in a worktree”
  1. Kaartic SivaraamSep 23, 2018
  2. Duy NguyenSep 24, 2018
  3. Kaartic SivaraamSep 25, 2018
  4. Junio C HamanoSep 25, 2018
  5. Kaartic SivaraamSep 26, 2018
  6. Kaartic SivaraamSep 26, 2018
  7. Duy NguyenSep 26, 2018
  8. Duy NguyenSep 26, 2018
  9. Junio C HamanoSep 26, 2018
  10. Kaartic SivaraamOct 2, 2018
  11. Kaartic SivaraamOct 4, 2018
  12. Duy NguyenOct 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.