git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Worktree: for-each function and list command
@ 2015-08-22 21:51 Michael Rappazzo
  2015-08-22 21:51 ` [PATCH v5 1/2] worktree: add 'for_each_worktree' function Michael Rappazzo
  2015-08-22 21:51 ` [PATCH v5 2/2] worktree: add 'list' command Michael Rappazzo
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Rappazzo @ 2015-08-22 21:51 UTC (permalink / raw)
  To: gitster, sunshine, dturner; +Cc: git, Michael Rappazzo

Changes since v4:
 - reduced memory usage by reusing string buffer variables
 - re-scoped variables in the for-each function
 - added tests for 'worktree list' with bare repos

Notes from previous discussion:
 - The following snippet:

> +	/* If the common_dir DOES NOT end with '/.git', then it is bare */
> +	main_is_bare = !strbuf_strip_suffix(&worktree_path, "/.git");

This code is run when the current dir is in a linked worktree (not the primary 
worktree).  In that context, the git config _does_ report that 'core.bare' is
true when the primary repo is bare, however `is_bare_repository()` returns
false.  The worktree_path also needs to the "/.git" removed from it.  
Therefore, I opted to keep the code like this.


Michael Rappazzo (2):
  worktree: add 'for_each_worktree' function
  worktree: add 'list' command

 Documentation/git-worktree.txt |  11 +++-
 builtin/worktree.c             | 138 +++++++++++++++++++++++++++++++++++++++++
 t/t2027-worktree-list.sh       |  81 ++++++++++++++++++++++++
 3 files changed, 229 insertions(+), 1 deletion(-)
 create mode 100755 t/t2027-worktree-list.sh

-- 
2.5.0

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

end of thread, other threads:[~2015-08-25  3:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22 21:51 [PATCH v5 0/2] Worktree: for-each function and list command Michael Rappazzo
2015-08-22 21:51 ` [PATCH v5 1/2] worktree: add 'for_each_worktree' function Michael Rappazzo
2015-08-22 21:51 ` [PATCH v5 2/2] worktree: add 'list' command Michael Rappazzo
2015-08-24 18:05   ` Junio C Hamano
2015-08-25  1:07     ` Eric Sunshine
2015-08-25  3:01   ` Mikael Magnusson

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 NNTP newsgroup(s).