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

Re: [PATCH v8 1/4] worktree: add top-level worktree.c

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 22, 2015, 17:16 UTC
Message-ID
<xmqqr3lq4bo0.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1442583027-47653-2-git-send-email-rappazzo@gmail.com>
Michael Rappazzo <rappazzo@gmail.com> writes:
Show 42 quoted lines
> worktree.c contains functions to work with and get information from
> worktrees.  This introduction moves functions related to worktrees
> from branch.c into worktree.c
>
> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
> ---
>  Makefile        |  1 +
>  branch.c        | 79 +-----------------------------------------------------
>  branch.h        |  8 ------
>  builtin/notes.c |  1 +
>  worktree.c      | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  worktree.h      | 12 +++++++++
>  6 files changed, 97 insertions(+), 86 deletions(-)
>  create mode 100644 worktree.c
>  create mode 100644 worktree.h
> ...
> diff --git a/branch.h b/branch.h
> index d3446ed..58aa45f 100644
> --- a/branch.h
> +++ b/branch.h
> @@ -59,12 +59,4 @@ extern int read_branch_desc(struct strbuf *, const char *branch_name);
>   */
>  extern void die_if_checked_out(const char *branch);
>  
> -/*
> - * Check if a per-worktree symref points to a ref in the main worktree
> - * or any linked worktree, and return the path to the exising worktree
> - * if it is.  Returns NULL if there is no existing ref.  The caller is
> - * responsible for freeing the returned path.
> - */
> -extern char *find_shared_symref(const char *symref, const char *target);
> -
>  #endif
> diff --git a/builtin/notes.c b/builtin/notes.c
> index 3608c64..8b30334 100644
> --- a/builtin/notes.c
> +++ b/builtin/notes.c
> @@ -20,6 +20,7 @@
>  #include "notes-merge.h"
>  #include "notes-utils.h"
>  #include "branch.h"
> +#include "worktree.h"
I think you no longer need to include branch.h after this change.
Other than that, this step looks uncontroversial.
Thanks.
Previous: Michael RappazzoNext: Michael Rappazzo
Message 3 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.