lib/repo-commit: Import detached metadata even if hardlink exists
Spotted while reading through the code, it looks like the
copy_detached_metadata() call is accidentally omitted if a hardlink
already exists for the .commit object.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1242
Approved by: cgwalters
Origin: upstream, 2017.13, commit:
86e072bdbe48a4f16efb05c00eb79114e5fdbf61
Gbp-Pq: Topic 2017.13
Gbp-Pq: Name lib-repo-commit-Import-detached-metadata-even-if-hardlink.patch
lib/pull: Fix regression with pull-local for nonexistent refs
I was reading the pull code for the last release, and spotted
a bug in commit
f923c2e1eaebe0c781f07d34ae1a03f94357bccd - in
the case where the ref doesn't exist, we don't set an error,
tripping an assertion in the main code.
The previous code wanted the ref to always exist, so just flip back the boolean
for "ignore noent". I moved the `g_strchomp()` just into the HTTP path - if a
local repo is corrupted in this way it's something to fix in that repo.
Closes: #1238
Approved by: pwithnall
Origin: upstream, 2017.13, commit:
b8c15ae859de7a353b99c98c6266ee626cd94e7e
Gbp-Pq: Topic 2017.13
Gbp-Pq: Name lib-pull-Fix-regression-with-pull-local-for-nonexistent-r.patch