From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 00/11] nd/worktree-move update
Date: Thu, 2 Feb 2017 15:49:56 +0700 [thread overview]
Message-ID: <20170202085007.21418-1-pclouds@gmail.com> (raw)
This squashes two changes from Johannes and Ramsay:
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 339c622e20..a1c91f1542 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -528,7 +528,7 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)
static void validate_no_submodules(const struct worktree *wt)
{
- struct index_state istate = {0};
+ struct index_state istate = { NULL };
int i, found_submodules = 0;
if (read_index_from(&istate, worktree_git_path(wt, "index")) > 0) {
diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh
index 084acc6c6d..b3105eaaed 100755
--- a/t/t2028-worktree-move.sh
+++ b/t/t2028-worktree-move.sh
@@ -71,13 +71,14 @@ test_expect_success 'move locked worktree' '
'
test_expect_success 'move worktree' '
+ toplevel="$(pwd)" &&
git worktree move source destination &&
test_path_is_missing source &&
git worktree list --porcelain | grep "^worktree" >actual &&
cat <<-EOF >expected &&
- worktree $TRASH_DIRECTORY
- worktree $TRASH_DIRECTORY/destination
- worktree $TRASH_DIRECTORY/elsewhere
+ worktree $toplevel
+ worktree $toplevel/destination
+ worktree $toplevel/elsewhere
EOF
test_cmp expected actual &&
git -C destination log --format=%s >actual2 &&
Nguyễn Thái Ngọc Duy (11):
worktree.c: zero new 'struct worktree' on allocation
worktree: reorder an if statement
get_worktrees() must return main worktree as first item even on error
worktree.c: get_worktrees() takes a new flag argument
worktree list: keep the list sorted
worktree.c: add validate_worktree()
worktree.c: add update_worktree_location()
worktree move: new command
worktree move: accept destination as directory
worktree move: refuse to move worktrees with submodules
worktree remove: new command
Documentation/git-worktree.txt | 28 ++++--
branch.c | 2 +-
builtin/branch.c | 2 +-
builtin/worktree.c | 176 +++++++++++++++++++++++++++++++--
contrib/completion/git-completion.bash | 5 +-
t/t2027-worktree-list.sh | 40 ++++++++
t/t2028-worktree-move.sh | 57 +++++++++++
worktree.c | 126 +++++++++++++++++++----
worktree.h | 15 ++-
9 files changed, 410 insertions(+), 41 deletions(-)
--
2.11.0.157.gd943d85
next reply other threads:[~2017-02-02 8:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 8:49 Nguyễn Thái Ngọc Duy [this message]
2017-02-02 8:49 ` [PATCH 01/11] worktree.c: zero new 'struct worktree' on allocation Nguyễn Thái Ngọc Duy
2017-02-02 8:49 ` [PATCH 02/11] worktree: reorder an if statement Nguyễn Thái Ngọc Duy
2017-02-02 8:49 ` [PATCH 03/11] get_worktrees() must return main worktree as first item even on error Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 04/11] worktree.c: get_worktrees() takes a new flag argument Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 05/11] worktree list: keep the list sorted Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 06/11] worktree.c: add validate_worktree() Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 07/11] worktree.c: add update_worktree_location() Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 08/11] worktree move: new command Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 09/11] worktree move: accept destination as directory Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 10/11] worktree move: refuse to move worktrees with submodules Nguyễn Thái Ngọc Duy
2017-02-02 8:50 ` [PATCH 11/11] worktree remove: new command Nguyễn Thái Ngọc Duy
2017-02-02 9:16 ` [PATCH 00/11] nd/worktree-move update Johannes Schindelin
2017-02-02 9:27 ` Duy Nguyen
2017-02-02 9:43 ` Johannes Schindelin
2017-02-02 9:50 ` Duy Nguyen
2017-02-02 10:37 ` Johannes Schindelin
2017-02-02 11:22 ` Duy Nguyen
2017-02-02 11:31 ` Johannes Schindelin
2017-02-02 12:33 ` Johannes Schindelin
2017-02-02 20:21 ` Junio C Hamano
2017-02-03 8:59 ` Duy Nguyen
2017-02-03 18:25 ` Junio C Hamano
2017-02-03 18:56 ` Junio C Hamano
2017-02-04 11:57 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170202085007.21418-1-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.