bugzilla-daemon at bugzilla.mindrot.org
2018-Jul-03 00:47 UTC
[Bug 2880] New: Git ignores (almost) all makefiles in subdirectories ./regress/*
https://bugzilla.mindrot.org/show_bug.cgi?id=2880
Bug ID: 2880
Summary: Git ignores (almost) all makefiles in subdirectories
./regress/*
Product: Portable OpenSSH
Version: 7.7p1
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5
Component: Build system
Assignee: unassigned-bugs at mindrot.org
Reporter: Torben.Hansen.2015 at rhul.ac.uk
The .gitignore file contains the pattern 'Makefile'. Since the pattern
is applied recursively in subdirectories the makefiles that build unit
tests, etc. are ignored.
.gitignore already contains the exception
'!regress/misc/fuzz-harness/Makefile', so it seems appropriate to add
exceptions for the other makefiles in ./regress/*.
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jul-03 06:39 UTC
[Bug 2880] Git ignores (almost) all makefiles in subdirectories ./regress/*
https://bugzilla.mindrot.org/show_bug.cgi?id=2880
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
Hi Torben,
I can't reproduce this. E.g.
$ pwd
/Users/djm/cvs/openssh
$ echo foo >> regress/misc/Makefile
$ git diff
diff --git a/regress/misc/Makefile b/regress/misc/Makefile
index 14c0c279..07a8f1c2 100644
--- a/regress/misc/Makefile
+++ b/regress/misc/Makefile
@@ -1,3 +1,4 @@
SUBDIR= kexfuzz
.include <bsd.subdir.mk>
+foo
Moreover the behaviour you describe seems at odds with this line from
the manual for gitignore:
> If the pattern does not contain a slash /, Git treats it as a shell glob
> pattern and checks for a match against the pathname relative to the
location
> of the .gitignore file (relative to the toplevel of the work tree if not
> from a .gitignore file).
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jul-03 07:38 UTC
[Bug 2880] Git ignores (almost) all makefiles in subdirectories ./regress/*
https://bugzilla.mindrot.org/show_bug.cgi?id=2880
--- Comment #2 from Torben <Torben.Hansen.2015 at rhul.ac.uk> ---
Hi Damien
I see the same behaviour. However, If the file is not tracked, then I
experience a different behaviour. If you, say, create a new git
repository with the OpenSSH source files and wants to start tracking
all files, then the makefiles will be ignored.
Toy example below
$ pwd
/Users/himsen/tmp
$ mkdir test_root test_root/test_subdir
$ cd test_root
$ git init
$ echo test >> test_subdir/Makefile
$ echo Makefile >> .gitignore
$ git add test_subdir/Makefile
The following paths are ignored by one of your .gitignore files:
test_subdir/Makefile
Use -f if you really want to add them.
Or, in your OpenSSH repository, you can do
$ git rm --cached regress/unittests/Makefile
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: regress/unittests/Makefile
seeing that regress/unittests/Makefile does not appear as untracked.
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jul-03 08:10 UTC
[Bug 2880] Git ignores (almost) all makefiles in subdirectories ./regress/*
https://bugzilla.mindrot.org/show_bug.cgi?id=2880 --- Comment #3 from Torben <Torben.Hansen.2015 at rhul.ac.uk> --- This extract from the Git manual explains that there is indeed a recursive thing going on: "Patterns read from a .gitignore file in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the toplevel of the work tree) being overridden by those in lower level files down to the directory containing the file. [...]" -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jul-03 18:54 UTC
[Bug 2880] Git ignores (almost) all makefiles in subdirectories ./regress/*
https://bugzilla.mindrot.org/show_bug.cgi?id=2880
Roumen Petrov <bugtrack at roumenpetrov.info> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugtrack at roumenpetrov.info
--- Comment #4 from Roumen Petrov <bugtrack at roumenpetrov.info> ---
The correct if to ignore only Makefile subject of creation, i.e. those
listed AC_CONFIG_FILES. Current "ignore" file does not follow this
rule.
So can not understand some comments on this issue.
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2024-Dec-04 14:01 UTC
[Bug 2880] Git ignores (almost) all makefiles in subdirectories ./regress/*
https://bugzilla.mindrot.org/show_bug.cgi?id=2880
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |3740
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Damien Miller <djm at mindrot.org> ---
Fixed in eaa1744f34c3
Referenced Bugs:
https://bugzilla.mindrot.org/show_bug.cgi?id=3740
[Bug 3740] Tracking bug for OpenSSH 10.0
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.