Explicitly adding ignored files in subdirectories not working

6 messages, 3 authors, 2016-06-15 · open the first message on its own page

Explicitly adding ignored files in subdirectories not working

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:48:20

Heya,

I've been bitten by this before, is this behavior intentional? We
don't even warn that the user's action was ignored; at the very least
we should do that. The current behavior is just frustrating.

sverre@laptop-sverre:~/code$ git init ignoretest
Initialized empty Git repository in /home/sverre/code/ignoretest/.git/
sverre@laptop-sverre:~/code$ cd ignoretest/
sverre@laptop-sverre:~/code/ignoretest$ mkdir subdir
sverre@laptop-sverre:~/code/ignoretest$ echo "hi" >> subdir/a.txt
sverre@laptop-sverre:~/code/ignoretest$ echo "subdir" >> .gitignore
sverre@laptop-sverre:~/code/ignoretest$ git add .gitignore
sverre@laptop-sverre:~/code/ignoretest$ git commit -m "set up ignore"
[master (root-commit) 5a5a614] set up ignore
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
sverre@laptop-sverre:~/code/ignoretest$ git add subdir/a.txt
sverre@laptop-sverre:~/code/ignoretest$ git status
# On branch master
nothing to commit (working directory clean)


-- 
Cheers,

Sverre Rabbelier

Re: Explicitly adding ignored files in subdirectories not working

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:48:20

Hi,

On Tue, 23 Feb 2010, Sverre Rabbelier wrote:
I've been bitten by this before, is this behavior intentional? We
don't even warn that the user's action was ignored; at the very least
we should do that. The current behavior is just frustrating.
I get something like this:

-- snip --
$ cd Documentation
$ touch doc.dep
$ git add doc.dep
The following paths are ignored by one of your .gitignore files:
Documentation/doc.dep
Use -f if you really want to add them.
fatal: no files added
-- snap --

Ciao,
Dscho

Re: Explicitly adding ignored files in subdirectories not working

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:48:20

Heya,

On Tue, Feb 23, 2010 at 22:50, Johannes Schindelin
[off-list ref] wrote:
$ cd Documentation
$ touch doc.dep
$ git add doc.dep
The following paths are ignored by one of your .gitignore files:
Documentation/doc.dep
Use -f if you really want to add them.
fatal: no files added
Do you have Documentation ignored? It works fine for ignored files,
files in _ignored directories_ however... :)

-- 
Cheers,

Sverre Rabbelier

Re: Explicitly adding ignored files in subdirectories not working

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:48:20

Hi,

On Tue, 23 Feb 2010, Sverre Rabbelier wrote:
On Tue, Feb 23, 2010 at 22:50, Johannes Schindelin
[off-list ref] wrote:
quoted
$ cd Documentation
$ touch doc.dep
$ git add doc.dep
The following paths are ignored by one of your .gitignore files:
Documentation/doc.dep
Use -f if you really want to add them.
fatal: no files added
Do you have Documentation ignored? It works fine for ignored files,
files in _ignored directories_ however... :)
Ah, that's what I missed...

Sorry,
Dscho

Re: Explicitly adding ignored files in subdirectories not working

From: Jeff King <hidden>
Date: 2016-06-15 22:48:20

On Tue, Feb 23, 2010 at 10:07:52PM +0100, Sverre Rabbelier wrote:
I've been bitten by this before, is this behavior intentional? We
don't even warn that the user's action was ignored; at the very least
we should do that. The current behavior is just frustrating.
It is intentional to consider them ignored (but was broken prior to
v1.7.0), but it is a bug not to complain to the user. See:

  http://thread.gmane.org/gmane.comp.version-control.git/140405

-Peff

Re: Explicitly adding ignored files in subdirectories not working

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:48:22

Heya,

On Wed, Feb 24, 2010 at 05:59, Jeff King [off-list ref] wrote:
 http://thread.gmane.org/gmane.comp.version-control.git/140405
Peff, IIRC from that thread was left to die with you handing over to
Junio? Junio, do you intend to investigate what's going on there?

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help