Commit 7968e90
committed
refdb_fs: properly parse corrupted reflogs
In previous versions, libgit2 could be coerced into writing reflog
messages with embedded newlines into the reflog by using
`git_stash_save` with a message containing newlines. While the root
cause is fixed now, it was noticed that upstream git is in fact able to
read such corrupted reflog messages just fine.
Make the reflog parser more lenient in order to just skip over
malformatted reflog lines to bring us in line with git. This requires us
to change an existing test that verified that we do indeed _fail_ to
parse such logs.1 parent 8532ed1 commit 7968e90
2 files changed
+29
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1653 | 1653 | | |
1654 | 1654 | | |
1655 | 1655 | | |
1656 | | - | |
1657 | 1656 | | |
1658 | 1657 | | |
1659 | 1658 | | |
1660 | 1659 | | |
1661 | 1660 | | |
| 1661 | + | |
1662 | 1662 | | |
1663 | 1663 | | |
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
1667 | | - | |
1668 | 1667 | | |
1669 | 1668 | | |
1670 | 1669 | | |
1671 | 1670 | | |
1672 | 1671 | | |
1673 | 1672 | | |
1674 | | - | |
| 1673 | + | |
1675 | 1674 | | |
1676 | 1675 | | |
1677 | 1676 | | |
1678 | 1677 | | |
1679 | 1678 | | |
1680 | 1679 | | |
1681 | | - | |
| 1680 | + | |
1682 | 1681 | | |
1683 | 1682 | | |
1684 | 1683 | | |
| |||
1692 | 1691 | | |
1693 | 1692 | | |
1694 | 1693 | | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
1698 | 1698 | | |
1699 | | - | |
| 1699 | + | |
1700 | 1700 | | |
1701 | | - | |
1702 | | - | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
1703 | 1704 | | |
1704 | | - | |
| 1705 | + | |
1705 | 1706 | | |
1706 | 1707 | | |
1707 | 1708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | 228 | | |
230 | 229 | | |
231 | 230 | | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
239 | | - | |
| 237 | + | |
| 238 | + | |
240 | 239 | | |
241 | 240 | | |
242 | | - | |
243 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
249 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
250 | 255 | | |
251 | 256 | | |
252 | 257 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
262 | 261 | | |
263 | 262 | | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
0 commit comments