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

[PATCH/WIP 0/6] Detached HEADs in new worktrees considered harmful

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 26, 2016, 16:39 UTC
Message-ID
<cover.1456504190.git.git@drmicha.warpmail.net>
Before someone loses their HEAD I should put this series out (again).
1/6 is a tiny documentation fix.

2/6 demonstrates that "git prune" in the main worktree loses HEADs in other worktrees, and vice versa.

In fact, one should rethink the meaning of "git rev-list --all" in the context of per-worktree refs such as HEAD.

3/6 is a possible fix (making "--all" mean "all refs in all worktrees") but may be too intrusive.

4/6, 5/6, 6/6 are some WIP patches about making 3/6 less intrusive and fixing some cases where do_head_ref_worktrees() has problems that do_head_ref() doesn't have.

Michael J Gruber (6):
  Documentation/git-worktree: spell --detach correctly
  t6014: test prune with detached HEADs in separate worktrees
  rev-list: list all heads with --all
  WIP: mess only with mark_reachable
  fix unborn branch case
  revisions: list all worktree HEADs with --all
 Documentation/git-worktree.txt     |  2 +-
 Documentation/rev-list-options.txt |  2 +-
 reachable.c                        |  2 +-
 refs.h                             |  1 +
 refs/files-backend.c               | 34 +++++++++++++++++++++++++++++++++-
 t/t6014-rev-list-all.sh            | 25 +++++++++++++++++++++++++
 6 files changed, 62 insertions(+), 4 deletions(-)
-- 
2.7.2.618.g7a61b68
Next: Michael J Gruber
Message 1 of 11 in “Detached HEADs in new worktrees considered harmful”
  1. 0/6 Detached HEADs in new worktrees considered harmfulMichael J Gruber, Feb 26, 2016
  2. 1/6 Documentation/git-worktree: spell --detach correctlyMichael J Gruber, Feb 26, 2016
  3. Junio C HamanoFeb 26, 2016
  4. 2/6 t6014: test prune with detached HEADs in separate worktreesMichael J Gruber, Feb 26, 2016
  5. Junio C HamanoFeb 26, 2016
  6. 3/6 rev-list: list all heads with --allMichael J Gruber, Feb 26, 2016
  7. Duy NguyenFeb 27, 2016
  8. 4/6 WIP: mess only with mark_reachableMichael J Gruber, Feb 26, 2016
  9. 5/6 WIP: fix unborn branch caseMichael J Gruber, Feb 26, 2016
  10. 6/6 revisions: list all worktree HEADs with --allMichael J Gruber, Feb 26, 2016
  11. Junio C HamanoFeb 26, 2016

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.