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 7d3ff941ff4be7079b48fea6ec38f07a8663701a..0f562b549ea83f0c5fcc8326e223fecfca3cc751 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 e26c4de4c629ef72d7820f147d59da1d51bbe2a1..d4e18e63ab7188dbd82f1fd12662d0c0c7ba4930 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