[PATCH] fetch-pack: Add missing line-feed character when sending depth-request packet line

2016-04-11 Thread Stan Hu
The pkt-line format mandates: "a sender should include a LF, but the receive MUST NOT complain if it is not present." This patch is not absolutely necessary since receivers handle the missing the LF, but this patch adds it for good measure. Signed-off-by: Stan Hu --- fetch-pack.c | 2

[PATCH] upload-pack: Exit when server finishes sending shallow-update in stateless RPC mode

2016-04-11 Thread Stan Hu
when it detected the client closed the connection. Signed-off-by: Stan Hu --- upload-pack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upload-pack.c b/upload-pack.c index b3f6653..4fb1e60 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -676,6 +676,8 @@ static void receive_needs

Incorrect tree shown with ls-tree ref^{type}:{{folder}}

2018-12-20 Thread Stan Hu
Suppose I have a repository that has the following files: foo/bar/test1.txt foo/{{curly}}/test2.txt The following works fine: $ git ls-tree master^{tree} 04 tree 9284ac5fef7ad99a2bd508a8c89bde8bd1a88e9ffoo $ git ls-tree master^{tree}:foo 04 tree 69497de4d9a72713f87df8280a147e0a597c4

[PATCH] sha1-name.c: Fix handling of revisions that contain paths with brackets

2018-12-23 Thread Stan Hu
the filename. Signed-off-by: Stan Hu --- sha1-name.c | 14 +- t/t3104-ls-tree-braces.sh | 30 ++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 t/t3104-ls-tree-braces.sh diff --git a/sha1-name.c b/sha1-name.c index

[PATCH] sha1-name.c: Fix handling of revisions that contain paths with brackets

2018-12-23 Thread Stan Hu
the filename. Signed-off-by: Stan Hu --- sha1-name.c | 14 +- t/t3104-ls-tree-braces.sh | 30 ++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 t/t3104-ls-tree-braces.sh diff --git a/sha1-name.c b/sha1-name.c index

[PATCH v2] sha1-name.c: Fix handling of revisions that contain paths with brackets

2018-12-23 Thread Stan Hu
the filename. Signed-off-by: Stan Hu --- sha1-name.c | 14 +- t/t3104-ls-tree-braces.sh | 30 ++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 t/t3104-ls-tree-braces.sh diff --git a/sha1-name.c b/sha1-name.c index

[PATCH v3] sha1-name.c: Fix handling of revisions that contain paths with brackets

2018-12-28 Thread Stan Hu
rectories named ^{tree} and other patterns that look like type restrictions. To handle those cases, scan from the beginning of the name instead of the end. Signed-off-by: Stan Hu --- sha1-name.c | 35 ++ t/t3104-ls-tree-braces.sh | 75 +

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2018-03-13 Thread Stan Hu
To be clear, this is how I think we got into this state: We have worktrees that are created to squash and rebase a branch. They were left around inadvertently for one reason or another. Since we were using git v2.14.3, a git gc would prune dangling objects because it never saw that a worktree s