make git worktree add dwim more
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest6 patches 0 repliesNew
- v56 patches 4 repliesSuperseded
- v44 patches 13 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 3 patches | 8 replies | Superseded | |
| v2 | 3 patches | 1 reply | Superseded | |
| v1 | 2 patches | 10 replies | Superseded |
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | checkout: factor out functions to new lib fileMakefile builtin/ checkout.c +1 more | +58 | 0 replies | |
| 2/6 | worktree: add can be created from any commit-ishDocumentation/ | +10 | 0 replies | |
| 3/6 | worktree: add --[no-]track option to the add subcommandDocumentation/ builtin/ t/ | +65 | 0 replies | |
| 4/6 | worktree: make add <path> <branch> dwimDocumentation/ builtin/ t/ | +43 | 0 replies | |
| 5/6 | worktree: add --guess-remote flag to add subcommandDocumentation/ builtin/ t/ | +46 | 0 replies | |
| 6/6 | add worktree.guessRemote config optionDocumentation/ Documentation/ builtin/ +1 more | +56 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH v6 0/6] make git worktree add dwim more
The previous rounds were at
https://public-inbox.org/git/[email protected]/,
https://public-inbox.org/git/[email protected]/,
https://public-inbox.org/git/[email protected]/,
https://public-inbox.org/git/[email protected]/ and
https://public-inbox.org/git/[email protected].
Thanks Junio for the review of the last round!
Changes since the last round:
- rephrased documentation and commit messaegs a bit use the
- established pattern and call git_config only once, instead of calling it multiple times.
Interdiff below:
Documentation/git-worktree.txt +5 -5
@@ -116,11 +116,11 @@ OPTIONS in linkgit:git-read-tree[1]. --[no-]guess-remote:: - With `add`, instead of creating a new branch from HEAD when - `<commit-ish>` is not given, if there exists a tracking branch - in exactly one remote matching the basename of the path, base - the new branch on the remote-tracking branch, and mark the - remote-tracking branch as "upstream" from the new branch. + With `worktree add <path>`, withouth `<commit-ish>`, instead + of creating a new branch from HEAD, if there exists a tracking + branch in exactly one remote matching the basename of `<path>, + base the new branch on the remote-tracking branch, and mark + the remote-tracking branch as "upstream" from the new branch. + This can also be set up as the default behaviour by using the `worktree.guessRemote` config option.
builtin/worktree.c +2 -4
@@ -43,7 +43,7 @@ static int git_worktree_config(const char *var, const char *value, void *cb)return 0 ; } -return 0 ; +return git_default_config (var, value, cb); }static int prune_worktree (const char *id,struct strbuf *reason)
@@ -371,8 +371,6 @@ static int add(int ac, const char **av, const char *prefix) OPT_END() }; -git_config (git_worktree_config,NULL ); -memset (&opts,0 ,sizeof (opts)); opts.checkout =1 ; ac =parse_options (ac, av, prefix, options, worktree_usage,0 );
@@ -603,7 +601,7 @@ int cmd_worktree(int ac, const char **av, const char *prefix) OPT_END() }; -git_config (git_default_config,NULL ); +git_config (git_worktree_config,NULL );if (ac <2 )usage_with_options (worktree_usage, options);
Thomas Gummerer (6):
checkout: factor out functions to new lib file
worktree: add can be created from any commit-ish
worktree: add --[no-]track option to the add subcommand
worktree: make add <path> <branch> dwim
worktree: add --guess-remote flag to add subcommand add worktree.guessRemote config option
Documentation/config.txt | 10 ++++ Documentation/git-worktree.txt | 44 ++++++++++---- Makefile | 1 + builtin/checkout.c | 41 +------------ builtin/worktree.c | 46 ++++++++++++++- checkout.c | 43 ++++++++++++++ checkout.h | 13 +++++ t/t2025-worktree-add.sh | 130 +++++++++++++++++++++++++++++++++++++++++ 8 files changed, 277 insertions(+), 51 deletions(-) create mode 100644 checkout.c create mode 100644 checkout.h
Signature · 1 line
2.15.0.426.gb06021eeb