Skip to content

fix local clone from a linked checkout

Nguyễn Thái Ngọc Duy git 3 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 0 repliesNew
  2. v35 patches 1 replySuperseded
  3. v25 patches 6 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6path.c: delete an extra spacepath.c+1 -10 replies
2/6t0002: add test for enter_repo(), non-strict modet/t0002-gitfile.sh+18 -00 replies
3/6enter_repo: avoid duplicating logic, use is_git_directory() insteadpath.c t/t0002-gitfile.sh+15 -20 replies
4/6enter_repo: allow .git files in strict modepath.c t/t0002-gitfile.sh+17 -20 replies
5/6clone: allow --local from a linked checkoutbuiltin/clone.c t/t2025-worktree-add.sh+9 -20 replies
6/6clone: better error when --reference is a linked checkoutbuiltin/clone.c+6 -10 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchBjørnar Snoksrud
1/6
2/6
3/6
4/6
5/6Noticed-by
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/6] fix local clone from a linked checkout

This fixes another embarassing bug in 4/6 and adds tests to make sure it works. Changes since v3

-- 8< --

path.c +1 -1
index 32d4ca6..a346134 100644
@@ -439,7 +439,7 @@ const char *enter_repo(const char *path, int strict)
 		path = validated_path;
 	}
 	else {
-		const char *gitfile = read_gitfile(used_path);
+		const char *gitfile = read_gitfile(path);
 		if (gitfile)
 			path = gitfile;
 		if (chdir(path))
t/t0002-gitfile.sh +42 -0

46 lines not on this page · raw message

-- 8< --

Nguyễn Thái Ngọc Duy (6):
path.c: delete an extra space
t0002: add test for enter_repo(), non-strict mode
enter_repo: avoid duplicating logic, use is_git_directory() instead
enter_repo: allow .git files in strict mode
clone: allow --local from a linked checkout
clone: better error when --reference is a linked checkout

 builtin/clone.c         | 13 ++++++++++---
 path.c                  | 14 +++++++++-----
 t/t0002-gitfile.sh      | 42 ++++++++++++++++++++++++++++++++++++++++++
 t/t2025-worktree-add.sh |  5 +++++
 4 files changed, 66 insertions(+), 8 deletions(-)
Signature · 1 line
2.3.0.rc1.137.g477eb31