Skip to content

Commit 9db3f9c

Browse files
committed
Reproduce roundtrip failure for commit that looks good otherwise
1 parent 31bdd2e commit 9db3f9c

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

gix-object/tests/encode/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ macro_rules! round_trip {
2424
let mut output = Vec::new();
2525
let item = <$borrowed>::from_bytes(&input)?;
2626
item.write_to(&mut output)?;
27-
assert_eq!(output.as_bstr(), input.as_bstr());
27+
assert_eq!(output.as_bstr(), input.as_bstr(), "borrowed");
2828

2929
let item: $owned = item.into();
3030
output.clear();
@@ -35,12 +35,12 @@ macro_rules! round_trip {
3535
let item = ObjectRef::from(<$borrowed>::from_bytes(&input)?);
3636
output.clear();
3737
item.write_to(&mut output)?;
38-
assert_eq!(output.as_bstr(), input.as_bstr());
38+
assert_eq!(output.as_bstr(), input.as_bstr(), "object-ref");
3939

4040
let item: Object = item.into();
4141
output.clear();
4242
item.write_to(&mut output)?;
43-
assert_eq!(output.as_bstr(), input.as_bstr());
43+
assert_eq!(output.as_bstr(), input.as_bstr(), "owned");
4444

4545
// Test the loose serialisation -> parse chain for an object kind
4646
let item = <$borrowed>::from_bytes(&input)?;
@@ -51,7 +51,7 @@ macro_rules! round_trip {
5151
item.write_to(w)?;
5252
let parsed = ObjectRef::from_loose(&output)?;
5353
let item2 = <$borrowed>::try_from(parsed).or(Err(super::Error::TryFromError))?;
54-
assert_eq!(item2, item);
54+
assert_eq!(item2, item, "object-ref looose");
5555
}
5656
Ok(())
5757
}
@@ -83,7 +83,8 @@ mod commit {
8383
"commit/signed-with-encoding.txt",
8484
"commit/unsigned.txt",
8585
"commit/whitespace.txt",
86-
"commit/with-encoding.txt"
86+
"commit/with-encoding.txt",
87+
"commit/subtle.txt"
8788
);
8889
}
8990

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
tree de33f909dd559dd60753264ccf9e80183a32c9cc
2+
parent 2305aad7ac23331e75465eccf425f899fa53a8d8
3+
author Brezak <[email protected]> 1724180029 +0200
4+
committer Brezak <[email protected]> 1728251787 +0200
5+
gpgsig -----BEGIN PGP SIGNATURE-----
6+
7+
iQEzBAABCAAdFiEE6+MMXTYlBWl/3EAJyziR4rEnnXwFAmcDB4sACgkQyziR4rEn
8+
nXy8owf9EkHTtmxUKhXiZ8ThGlpqwzcUaaYOBSX6Pmwacz+mqsA7fwLN/AxyN/Wv
9+
d7zVhCYX01aZi7lutN4rVa08S9ZoXeZOBHm1u2YtrtETcjiBpVIVt33spkLendvB
10+
1C5UyuVhZ4m8bHG5A3kmJlg0Mf9cwKvNTZiozb+lG79p1b3rc8PJHilHdAMmaUkb
11+
58/7dUXM1B/LLd9p4IyJdLVA0jZmAagm+akiH/A1lji7zSvLJqhr1xOlD6L/K/Ao
12+
TM6Kk0i2+eido5vaoutUFuKx+u4j4OtA3lDohvmu36RwyZbfa3OSAg+TWChgYBc/
13+
ctOcWsB0EKL3XKz7X8Sw2EIS1Fcd4w==
14+
=aZq+
15+
-----END PGP SIGNATURE-----
16+
17+
18+
Check that `#[pointee]` is applied only to generic arguments

0 commit comments

Comments
 (0)