Skip to content

Commit 228c341

Browse files
committed
Merge branch 'maint'
* maint: docs: describe behavior of relative submodule URLs fix hang in git fetch if pointed at a 0 length bundle Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore
2 parents 17b4e93 + bc0fe84 commit 228c341

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

Documentation/git-read-tree.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,10 @@ OPTIONS
8383

8484
--prefix=<prefix>/::
8585
Keep the current index contents, and read the contents
86-
of the named tree-ish under the directory at `<prefix>`. The
87-
original index file cannot have anything at the path
88-
`<prefix>` itself, nor anything in the `<prefix>/`
89-
directory. Note that the `<prefix>/` value must end
90-
with a slash.
86+
of the named tree-ish under the directory at `<prefix>`.
87+
The command will refuse to overwrite entries that already
88+
existed in the original index file. Note that the `<prefix>/`
89+
value must end with a slash.
9190

9291
--exclude-per-directory=<gitignore>::
9392
When running the command with `-u` and `-m` options, the

Documentation/git-submodule.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ to exist in the superproject. If <path> is not given, the
7979
<repository> is the URL of the new submodule's origin repository.
8080
This may be either an absolute URL, or (if it begins with ./
8181
or ../), the location relative to the superproject's origin
82-
repository. If the superproject doesn't have an origin configured
82+
repository (Please note that to specify a repository 'foo.git'
83+
which is located right next to a superproject 'bar.git', you'll
84+
have to use '../foo.git' instead of './foo.git' - as one might expect
85+
when following the rules for relative URLs - because the evaluation
86+
of relative URLs in Git is identical to that of relative directories).
87+
If the superproject doesn't have an origin configured
8388
the superproject is its own authoritative upstream and the current
8489
working directory is used instead.
8590
+

bundle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ static int strbuf_readline_fd(struct strbuf *sb, int fd)
3131
while (1) {
3232
char ch;
3333
ssize_t len = xread(fd, &ch, 1);
34-
if (len < 0)
35-
return -1;
34+
if (len <= 0)
35+
return len;
3636
strbuf_addch(sb, ch);
3737
if (ch == '\n')
3838
break;

perl/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
perl.mak
22
perl.mak.old
3+
MYMETA.json
34
MYMETA.yml
45
blib
56
blibdirs

t/t5704-bundle.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,10 @@ test_expect_failure 'bundle --stdin <rev-list options>' '
5353
5454
'
5555

56+
test_expect_success 'empty bundle file is rejected' '
57+
58+
>empty-bundle && test_must_fail git fetch empty-bundle
59+
60+
'
61+
5662
test_done

0 commit comments

Comments
 (0)