gitattributes defuse: work even if .git/info/attributes missing Treat this as "needs setup" rather than "needs adjustment". Closes: #981344 Reported-by: Andrej Shadura <andrewsh@debian.org> Tested-by: Andrej Shadura <andrewsh@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Terminology: Change "rewind" to "rewrite" where appropriate In #928473, Colin Watson writes: > the use of "rewind" as a synonym for "non-fast-forwarding", while > somewhat common in git terminology, is unfortunate. The terms seem > to be borrowed from video playback systems, where "rewind" is often > just the exact opposite of "fast-forward", and so when I see > "rewinding history" in a few places in dgit(1) my initial > interpretation is that it must mean "updating a ref to point to an > ancestor of the commit that it previously pointed to", whereas I > think dgit(1) means "any push that isn't a fast-forward". I don't > know if I'm the only one for whom it has that connotation. This makes sense. So, I am changing uses of "rewind" which do not mean precisely going back to an ancestor. I think we can often use the word "rewrite" for the more general case, but there are some places where another wording is better. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: absurd: Provide a way for absurd git to print warnings The file ../../absurd-apply-warnings is dumped to dgit's stderr. Nothing writes to it yet, so no overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Once again cope with archive skew Since our http rearrangements, we have lost the ability to try multiple dsc versions which means we cope badly with archive skew. This was an editing error: in 7821907696db dgit: Abolish url_get in favour of url_fetch we omitted to notice that url_get implicitly does what url_fetch needs Ok404 to do. So we didn't add the Ok404 parameter. Fix this by adding it now. Closes: #935874 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: curl: pass CURLOPT_FOLLOWLOCATION This was accidentally dropped in the 9.6 http changes. Closes: #939564 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Fail early when the archive/ tag already exists. Suggest using a new version number. We need a new --force option to override this check. Closes: #935802 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Warn when we see what look like our options passed too late Closes: #934807 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Use distro-info-data to resolve unknown suites to distros Closes: #931212 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Use $tarball_f_ext_re for test_source_only_changes The old ad-hoc regexp doesn't match .tar.gz.{asc,sig}. Closes: #939280 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: vcs-git handling: Strip [...] a la Haskell Team The final syntax of this is not yet agreed but this regexp ought to do the right thing in all reasonable cases. (Ie, no [ ] inside the [ ].) See also #932696 against policy, which is discussing the spec. Closes: #932699 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: update-vcs-git: Use vcs_git_url_of_ctrl So we strip -b fragments as we ought. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: update-vcs-git: Print a less confusing message if unchanged Previously, we would say it was "already configured" which is unspecific and sounds a bit like an error. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: update-vcs-git: Do not crash if url is unchanged Previously, we would pass an empty command array to runcmd, causing a mysterious-looking failure. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Break out vcs_git_url_of_ctrl This should have been done before. No functional change so far. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Fix on NFS (avoid leaking an open file in a directory to rm) The file debian/source/format was open by "dgit fetch" but never closed, causing failure to remove the extracted tree on NFS. Closes: #933827 Signed-off-by: Stéphane Glondu <glondu@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: WWW::Curl: Double check that $response_body was set We are making some assumptions about how WWW::Curl behaves. This confess, with appropriate tests, should catch any future problems. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: WWW::Curl Set $response_body to '' explicitly check_for_git calls url_fetch with a WWW::Curl parameter CURLOPT_NOBODY which suppresses saving the body. The result is that CURLOPT_WRITEDATA does not update $response_body. Then, even on success, url_fetch returns undef (which ought to mean 404). Strictly this is a bit sneaky of check_for_git. But, rather than trying to make this interface more formal, just make url_fetch set $response_body to ''. It does return this except in the success case, so the error cases are still handled right. Closes: #934126 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Slightly more debugging for check_for_git with http[s] Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Abolish url_get in favour of url_fetch This removes use of LWP from dgit. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit: Use libcurl, not @curl, for git check This means that when we sort out our TLS problems this will be fixed too. The remaining use of command-line curl is just to download additional .dsc compoments. I intend to leave that as-is. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>