[devscripts] 01/01: debchange: Detect git repositories even if .git is a file
Joachim Breitner
nomeata at moszumanska.debian.org
Sat Aug 15 12:06:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to branch master
in repository devscripts.
commit cd94c02bbf4a29a72d9adc52b822d45643b0e059
Author: Joachim Breitner <nomeata at debian.org>
Date: Sat Aug 15 12:57:23 2015 +0200
debchange: Detect git repositories even if .git is a file
..instead of a directory, as it can be the case with "git worktree" worktrees.
---
debian/changelog | 3 +++
scripts/debcommit.pl | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 34657fc..6bf3aac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ devscripts (2.15.9) UNRELEASED; urgency=medium
+ Work around tar --delete not working unless piping. This should
make the support for Excluded-Files more reliable.
Thanks to Felix Natter for identifying the problem and solution.
+ * debchange:
+ + Detect git repositories even if .git is a file instead of a directory,
+ as it can be the case with "git worktree" worktrees.
[ James McCoy ]
* bts:
diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl
index 352bdcd..7bf6d95 100755
--- a/scripts/debcommit.pl
+++ b/scripts/debcommit.pl
@@ -448,7 +448,8 @@ sub getprog {
if (-d ".bzr") {
return "bzr";
}
- if (-d ".git") {
+ if (-e ".git") {
+ # With certain forms of git checkouts, .git can be a file instead of a directory
return "git";
}
if (-d ".hg") {
@@ -474,7 +475,7 @@ sub getprog {
if (-d "$dir/.bzr") {
return "bzr";
}
- if (-d "$dir/.git") {
+ if (-e "$dir/.git") {
return "git";
}
if (-d "$dir/.hg") {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list