git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug when combined with etckeeper
@ 2018-10-10  9:33 Naja Melan
  2018-10-10 14:33 ` Jeff King
  2018-10-10 14:34 ` Joey Hess
  0 siblings, 2 replies; 4+ messages in thread
From: Naja Melan @ 2018-10-10  9:33 UTC (permalink / raw)
  To: git; +Cc: id

I am running:

Linux  4.18.12-arch1-1-ARCH #1 SMP PREEMPT Thu Oct 4 01:01:27 UTC 2018 x86_64 GNU/Linux

git version 2.19.1

etckeeper Version: 1.18.8


I ran into a strange bug. In the following script the commit at the end will fail with: 

> The following paths are ignored by one of your .gitignore files:
> .etckeeper
> Use -f if you really want to add them.

Note that there is no .gitignore file and no `.etckeeper` file in the repository, there is nothing in .git/exclude. There is no `core.excludesFile`, not locally, global, nor system. There are no userwide or systemwide ignore files. In fact there is not a single text file on my system which matches the regex '^\.etckeeper'. 

Also `git check-ignore .etckeeper` returns exit status 1. Thus I conclude that something isn't right. I don't know where the exclude rule comes from...

It works as expected if the `-a` option is not used on `git commit`.

I have not found any hints in the scripts from the etckeeper package that might explain this.

#------------------------------------------------
#! /usr/bin/bash

rm -rf gitignorebug

mkdir gitignorebug

cd gitignorebug

git init

git config --local user.name  "git bug"
git config --local user.email "git@bug.com"

touch file

git add file

git commit -am"add file"
#---------------------------------------------------

Thank you for looking into it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-13 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-10  9:33 bug when combined with etckeeper Naja Melan
2018-10-10 14:33 ` Jeff King
2018-10-10 14:34 ` Joey Hess
2018-10-13 12:36   ` Naja Melan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).