tags 439992 patch
thanks

also sprach Junichi Uekawa <[EMAIL PROTECTED]> [2007.08.29.0208 +0200]:
> [09:04:14]dancer64:pbuilder> debcommit -m 'release 0.172' debian/changelog
> git commit -m 'release 0.172' 'debian/changelog' 'debian/changelog'
> error: pathspec 'debian/changelog' did not match any file(s) known to git.
> Did you forget to 'git add'?
> debcommit: commit failed

This is a problem with git:

piper:/tmp/cdt.dfw30467> date > a; git add a; git commit -m.
Created initial commit fed4229: .
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
piper:/tmp/cdt.dfw30467> git commit
piper:/tmp/cdt.dfw30467> date >> a
piper:/tmp/cdt.dfw30467> git commit -m. a a
error: pathspec 'a' did not match any file(s) known to git.
Did you forget to 'git add'?

I'll raise this issue with the git mailing list, but I am not sure
it will fly. Thus, I suggest to fix this in devscripts as well.
Here's the patch (thanks to vorlon, Sesse, KiBi, ifvoid for perl hand-holding).

PS: I suggest declaring my $debchangelog='debian/changelog' and
using that in the code. Just seems cleaner.

diff -Nru /tmp/BL0GXNrulF/devscripts-2.10.7/scripts/debcommit.pl 
/tmp/gnlxlCsQWz/devscripts-2.10.8/scripts/debcommit.pl
--- /tmp/BL0GXNrulF/devscripts-2.10.7/scripts/debcommit.pl      2007-08-04 
22:54:20.000000000 +0200
+++ /tmp/gnlxlCsQWz/devscripts-2.10.8/scripts/debcommit.pl      2007-08-29 
10:01:30.000000000 +0200
@@ -109,7 +109,9 @@
 }
 
 my @files_to_commit = @ARGV;
-push @files_to_commit, 'debian/changelog' if @files_to_commit;
+if (@files_to_commit && !grep('debian/changelog', @files_to_commit)) {
+  push @files_to_commit, 'debian/changelog';
+}
 
 my $prog=getprog();
 if (! -e "debian/changelog") {

-- 
 .''`.   martin f. krafft <[EMAIL PROTECTED]>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)

Reply via email to