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

[PATCH v8 0/4] worktree: list functions and command

From
Michael Rappazzo <rappazzo@gmail.com>
Date
Sep 18, 2015, 13:30 UTC
Message-ID
<1442583027-47653-1-git-send-email-rappazzo@gmail.com>
Changes from v7[1]:
	- Reworked history to try to maintain blame from moving functions 
	  from branch.c
	- Removed the worktree_list struct (linked list) and instead return
	  return an array of worktrees.  An alternative was also proposed to
	  include a `next` pointer in the worktree struct.  I coded this 
	  option separately (found in my github fork[2]), but ultimately felt
	  that the array was more managable from a client perspective.
	- Removed the `--skip-bare` and `--verbose` command line options for 
	  `worktree list`.
	- The default output of the includes all of the details which were
	  previously only included in verbose output.  Sample output:
		$git worktree list
		/Users/me/code/bare-git-source         (bare)
		/Users/me/code/worktree-git-from-bare  7ecec52 [master]
		/Users/me/code/wt2                     8681989 (detached HEAD)
	- Added `--porcelain` option to the worktree list command.  
		$git worktree list --porcelain
		worktree /Users/mike/code/bare-git-source
		bare
		
		worktree /Users/mike/code/worktree-git-from-bare
		branch master
		
		worktree /Users/mike/code/wt2
		detached at 8681989

[1]: http://thread.gmane.org/gmane.comp.version-control.git/277335 [2]: https://github.com/git/git/compare/master...rappazzo:worktree-list/v8/next-entry-in-worktree

Michael Rappazzo (4):
  worktree: add top-level worktree.c
  worktree: refactor find_linked_symref function
  worktree: add functions to get worktree details
  worktree: add 'list' command
 Documentation/git-worktree.txt |  15 ++-
 Makefile                       |   1 +
 branch.c                       |  79 +-------------
 branch.h                       |   8 --
 builtin/notes.c                |   1 +
 builtin/worktree.c             |  78 ++++++++++++++
 t/t2027-worktree-list.sh       |  86 +++++++++++++++
 worktree.c                     | 238 +++++++++++++++++++++++++++++++++++++++++
 worktree.h                     |  38 +++++++
 9 files changed, 457 insertions(+), 87 deletions(-)
 create mode 100755 t/t2027-worktree-list.sh
 create mode 100644 worktree.c
 create mode 100644 worktree.h
-- 
2.5.0
Next: Michael Rappazzo
Message 1 of 11 in “worktree: list functions and command”
  1. 0/4 worktree: list functions and commandMichael Rappazzo, Sep 18, 2015
  2. 1/4 worktree: add top-level worktree.cMichael Rappazzo, Sep 18, 2015
  3. Junio C HamanoSep 22, 2015
  4. 2/4 worktree: refactor find_linked_symref functionMichael Rappazzo, Sep 18, 2015
  5. Junio C HamanoSep 22, 2015
  6. 3/4 worktree: add functions to get worktree detailsMichael Rappazzo, Sep 18, 2015
  7. Junio C HamanoSep 22, 2015
  8. 4/4 worktree: add 'list' commandMichael Rappazzo, Sep 18, 2015
  9. Junio C HamanoSep 22, 2015
  10. Mike RappazzoSep 24, 2015
  11. Junio C HamanoSep 24, 2015

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.