git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/5] add "git worktree repair" command
@ 2020-08-27  8:21 Eric Sunshine
  2020-08-27  8:21 ` [PATCH 1/5] worktree: add skeleton "repair" command Eric Sunshine
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Eric Sunshine @ 2020-08-27  8:21 UTC (permalink / raw)
  To: git; +Cc: Henré Botha, Jeff King, Eric Sunshine

The purpose of this patch series is twofold.

First, it adds a "git worktree repair" command to help users recover
from situations in which worktree administrative files can become
outdated or corrupted due to external factors. Simple examples include
(1) the user moving a worktree manually rather than via "git worktree
move" which causes the main worktree (or bare repository) to lose track
of the worktree, and (2) moving the main worktree (or bare repository)
which results in linked worktrees being unable to find the repository.

Second, it fixes two bugs with "git init --separate-git-dir" when linked
worktrees are involved (reported by [1]), both of which cause worktree
administrative files to become outdated or corrupted.

An intentional side-effect of the --separate-git-dir fix in patch [5/5]
is that it closes an additional loophole not covered by [2] which made
it illegal to use --separate-git-dir in conjunction with bare
repositories. Peff is Cc:'d because he commented on that thread.

[1]: https://lore.kernel.org/git/CAHbriek39i9NSHRw6DZm0dftk-GkeAYR74c0xyss0vbeDHu1Hw@mail.gmail.com/T/
[2]: https://lore.kernel.org/git/20200809225316.19503-1-sunshine@sunshineco.com/T/

Eric Sunshine (5):
  worktree: add skeleton "repair" command
  worktree: teach "repair" to fix worktree back-links to main worktree
  worktree: teach "repair" to fix outgoing links to worktrees
  init: teach --separate-git-dir to repair linked worktrees
  init: make --separate-git-dir work from within linked worktree

 Documentation/git-worktree.txt |  26 ++++-
 builtin/init-db.c              |  26 +++++
 builtin/worktree.c             |  29 ++++++
 t/t0001-init.sh                |  28 ++++++
 t/t2406-worktree-repair.sh     | 169 +++++++++++++++++++++++++++++++++
 worktree.c                     | 127 +++++++++++++++++++++++++
 worktree.h                     |  22 +++++
 7 files changed, 425 insertions(+), 2 deletions(-)
 create mode 100755 t/t2406-worktree-repair.sh

-- 
2.28.0.461.g40977abb40


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-08-31 19:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  8:21 [PATCH 0/5] add "git worktree repair" command Eric Sunshine
2020-08-27  8:21 ` [PATCH 1/5] worktree: add skeleton "repair" command Eric Sunshine
2020-08-27 16:08   ` Junio C Hamano
2020-08-27 19:30     ` Eric Sunshine
2020-08-27  8:21 ` [PATCH 2/5] worktree: teach "repair" to fix worktree back-links to main worktree Eric Sunshine
2020-08-27 17:05   ` Junio C Hamano
2020-08-30  7:20     ` Eric Sunshine
2020-08-27  8:21 ` [PATCH 3/5] worktree: teach "repair" to fix outgoing links to worktrees Eric Sunshine
2020-08-27 17:14   ` Junio C Hamano
2020-08-30  7:36     ` Eric Sunshine
2020-08-31 19:07       ` Junio C Hamano
2020-08-28  2:15   ` Johannes Schindelin
2020-08-28 16:27     ` Eric Sunshine
2020-08-27  8:21 ` [PATCH 4/5] init: teach --separate-git-dir to repair linked worktrees Eric Sunshine
2020-08-27  8:21 ` [PATCH 5/5] init: make --separate-git-dir work from within linked worktree Eric Sunshine
2020-08-31  6:57 ` [PATCH v2 0/5] add "git worktree repair" command Eric Sunshine
2020-08-31  6:57   ` [PATCH v2 1/5] worktree: add skeleton "repair" command Eric Sunshine
2020-08-31  6:57   ` [PATCH v2 2/5] worktree: teach "repair" to fix worktree back-links to main worktree Eric Sunshine
2020-08-31  6:57   ` [PATCH v2 3/5] worktree: teach "repair" to fix outgoing links to worktrees Eric Sunshine
2020-08-31  6:57   ` [PATCH v2 4/5] init: teach --separate-git-dir to repair linked worktrees Eric Sunshine
2020-08-31  6:58   ` [PATCH v2 5/5] init: make --separate-git-dir work from within linked worktree Eric Sunshine
2020-08-31 18:59   ` [PATCH v2 0/5] add "git worktree repair" command Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).