isomorphic-git 1.44.9 → 1.44.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +30 -16
- package/index.js +30 -16
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/managers/index.cjs +28 -14
- package/managers/index.js +28 -14
- package/managers/index.umd.min.js +1 -1
- package/managers/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -4758,20 +4758,34 @@ class GitCommit {
|
|
|
4758
4758
|
const obj = {
|
|
4759
4759
|
parent: [],
|
|
4760
4760
|
};
|
|
4761
|
-
const
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4761
|
+
const keyOf = h => h.slice(0, h.indexOf(' '));
|
|
4762
|
+
const valueOf = h => h.slice(h.indexOf(' ') + 1);
|
|
4763
|
+
// Git reads the start of a commit by position: one `tree`, then the
|
|
4764
|
+
// `parent` lines that follow it directly. Anything after that run is an
|
|
4765
|
+
// extra header that git keeps but never interprets, so a `tree` or
|
|
4766
|
+
// `parent` further down must not count here either. Reading them would
|
|
4767
|
+
// give the same oid a different tree, or a different ancestry, than git
|
|
4768
|
+
// and every other implementation reports.
|
|
4769
|
+
if (hs.length === 0 || keyOf(hs[0]) !== 'tree') {
|
|
4770
|
+
throw new ParseError(
|
|
4771
|
+
'tree as the first commit header',
|
|
4772
|
+
keyOf(hs[0] || '')
|
|
4773
|
+
)
|
|
4774
|
+
}
|
|
4775
|
+
obj.tree = valueOf(hs[0]);
|
|
4776
|
+
let index = 1;
|
|
4777
|
+
while (index < hs.length && keyOf(hs[index]) === 'parent') {
|
|
4778
|
+
obj.parent.push(valueOf(hs[index]));
|
|
4779
|
+
index++;
|
|
4780
|
+
}
|
|
4781
|
+
const seen = new Set(['tree', 'parent']);
|
|
4782
|
+
for (; index < hs.length; index++) {
|
|
4783
|
+
const key = keyOf(hs[index]);
|
|
4784
|
+
// The first occurrence of a single-valued header wins, the way canonical
|
|
4785
|
+
// git reads them.
|
|
4786
|
+
if (seen.has(key)) continue
|
|
4787
|
+
seen.add(key);
|
|
4788
|
+
obj[key] = valueOf(hs[index]);
|
|
4775
4789
|
}
|
|
4776
4790
|
if (obj.author) {
|
|
4777
4791
|
obj.author = parseAuthor(obj.author);
|
|
@@ -10280,8 +10294,8 @@ function filterCapabilities(server, client) {
|
|
|
10280
10294
|
|
|
10281
10295
|
const pkg = {
|
|
10282
10296
|
name: 'isomorphic-git',
|
|
10283
|
-
version: '1.44.
|
|
10284
|
-
agent: 'git/isomorphic-git@1.44.
|
|
10297
|
+
version: '1.44.10',
|
|
10298
|
+
agent: 'git/isomorphic-git@1.44.10',
|
|
10285
10299
|
};
|
|
10286
10300
|
|
|
10287
10301
|
class FIFO {
|
package/index.js
CHANGED
|
@@ -4745,20 +4745,34 @@ class GitCommit {
|
|
|
4745
4745
|
const obj = {
|
|
4746
4746
|
parent: [],
|
|
4747
4747
|
};
|
|
4748
|
-
const
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4748
|
+
const keyOf = h => h.slice(0, h.indexOf(' '));
|
|
4749
|
+
const valueOf = h => h.slice(h.indexOf(' ') + 1);
|
|
4750
|
+
// Git reads the start of a commit by position: one `tree`, then the
|
|
4751
|
+
// `parent` lines that follow it directly. Anything after that run is an
|
|
4752
|
+
// extra header that git keeps but never interprets, so a `tree` or
|
|
4753
|
+
// `parent` further down must not count here either. Reading them would
|
|
4754
|
+
// give the same oid a different tree, or a different ancestry, than git
|
|
4755
|
+
// and every other implementation reports.
|
|
4756
|
+
if (hs.length === 0 || keyOf(hs[0]) !== 'tree') {
|
|
4757
|
+
throw new ParseError(
|
|
4758
|
+
'tree as the first commit header',
|
|
4759
|
+
keyOf(hs[0] || '')
|
|
4760
|
+
)
|
|
4761
|
+
}
|
|
4762
|
+
obj.tree = valueOf(hs[0]);
|
|
4763
|
+
let index = 1;
|
|
4764
|
+
while (index < hs.length && keyOf(hs[index]) === 'parent') {
|
|
4765
|
+
obj.parent.push(valueOf(hs[index]));
|
|
4766
|
+
index++;
|
|
4767
|
+
}
|
|
4768
|
+
const seen = new Set(['tree', 'parent']);
|
|
4769
|
+
for (; index < hs.length; index++) {
|
|
4770
|
+
const key = keyOf(hs[index]);
|
|
4771
|
+
// The first occurrence of a single-valued header wins, the way canonical
|
|
4772
|
+
// git reads them.
|
|
4773
|
+
if (seen.has(key)) continue
|
|
4774
|
+
seen.add(key);
|
|
4775
|
+
obj[key] = valueOf(hs[index]);
|
|
4762
4776
|
}
|
|
4763
4777
|
if (obj.author) {
|
|
4764
4778
|
obj.author = parseAuthor(obj.author);
|
|
@@ -10267,8 +10281,8 @@ function filterCapabilities(server, client) {
|
|
|
10267
10281
|
|
|
10268
10282
|
const pkg = {
|
|
10269
10283
|
name: 'isomorphic-git',
|
|
10270
|
-
version: '1.44.
|
|
10271
|
-
agent: 'git/isomorphic-git@1.44.
|
|
10284
|
+
version: '1.44.10',
|
|
10285
|
+
agent: 'git/isomorphic-git@1.44.10',
|
|
10272
10286
|
};
|
|
10273
10287
|
|
|
10274
10288
|
class FIFO {
|