git/list[1] front-page[2] threads[3] people[4] search[5] about
 

bug when combined with etckeeper

From
Naja Melan <najamelan@autistici.org>
Date
Oct 10, 2018, 09:33 UTC
Message-ID
<4d7cddf8-34b3-eaa4-dc9e-e190062e6135@autistici.org>
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.
Next: Jeff King
Message 1 of 4 in “bug when combined with etckeeper”
  1. Naja MelanOct 10, 2018
  2. Jeff KingOct 10, 2018
  3. Joey HessOct 10, 2018
  4. Naja MelanOct 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.