chiark / gitweb /
absurd/git: Do not fail to import a .dsc containing patches to .git/ (!)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Dec 2016 14:54:30 +0000 (14:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Dec 2016 16:58:57 +0000 (16:58 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
absurd/git
debian/changelog

index 7d3ff94..0f562b5 100755 (executable)
@@ -95,7 +95,15 @@ END
 printf "%s\n" "$omgwtf" >debian/patches/series
 printf "%s\n" "$patch" >>debian/patches/series
 
+# Just in case some joker tries to patch .git/something
+mv .git ../.git
+set +e
 dpkg-source --before-build .
+rc=$?
+set -e
+rm -rf .git
+mv ../.git .
+test $rc = 0
 
 rm -f $omgwtf debian/patches/$omgwtf
 
index e26c4de..d4e18e6 100644 (file)
@@ -23,6 +23,7 @@ dgit (2.12~) unstable; urgency=medium
     on a patch during .dsc import.  Apropos of #848391.
   * Do not fail to import a .dsc containing patches which patch files
     multiple times, due to #848611.  Closes:#848391.
+  * Do not fail to import a .dsc containing patches to .git/ (!)
 
   Test suite:
   * Provide and use stunt lintian and debuild, to avoid lintian