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

Re: [PATCH v2 20/23] .gitignore: touch up the entries regarding Visual Studio

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 26, 2019, 14:57 UTC
Message-ID
<nycvar.QRO.7.76.6.1908261638450.46@tvgsbejvaqbjf.bet>
In-Reply-To
<e221aaf8-7d0b-6feb-3f58-1e9e4382939b@iee.email>
Hi,
On Sun, 25 Aug 2019, Philip Oakley wrote:
Show 32 quoted lines
> On 25/08/2019 20:09, SZEDER Gábor wrote:
> > On Sun, Aug 25, 2019 at 02:20:32PM +0100, Philip Oakley wrote:
> > >
> > > On 25/08/2019 13:07, SZEDER Gábor wrote:
> > > > On Mon, Jul 29, 2019 at 01:08:14PM -0700, Philip Oakley via GitGitGadget
> > > > wrote:
> > > > > Add the Microsoft .manifest pattern, and do not anchor the 'Debug'
> > > > > and 'Release' entries at the top-level directory, to allow for
> > > > > multiple projects (one per target).
> > > > >
> > > > > Signed-off-by: Philip Oakley <philipoakley@iee.org>
> > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > > > > ---
> > > > >   .gitignore | 5 +++--
> > > > >   1 file changed, 3 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/.gitignore b/.gitignore
> > > > > index e096e0a51c..e7bb15d301 100644
> > > > > --- a/.gitignore
> > > > > +++ b/.gitignore
> > > > > @@ -230,6 +230,7 @@
> > > > >   *.ipdb
> > > > >   *.dll
> > > > >   .vs/
> > > > > -/Debug/
> > > > > -/Release/
> > > > > +*.manifest
> > > > This new line ignores the tracked file 'compat/win32/git.manifest'
> > > > that was added fairly recently in fe90397604 (mingw: embed a manifest
> > > > to trick UAC into Doing The Right Thing, 2019-06-27).
> > > >
> > > > I wonder whether that's intentional or accidental.
This was an oversight of mine, my apologies. That line should go.
Show 22 quoted lines
> > > > I'm inclined to think that it's merely accidental, because, as far as
> > > > I understand, this is an old-ish patch from times when there wasn't
> > > > any 'git.manifest' file in tree, and simply noone noticed that in the
> > > > meantime we got one.  But I have no idea about how a Git build with
> > > > Visual Studio is supposed to work, so it doesn't really matter what
> > > > I'm inclined to think :)
> > > >
> > > At the time, it was just one of the many non-source files that were
> > > generated by Visual Studio that cluttered the status list and also could
> > > accidentally added to the tracked files.
> > >
> > > The newly added .manifest file does appear to be there to 'trick' the
> > > Windows User Access Control (UAC) which otherwise can be an annoyance to
> > > 'regular' users.
> > Sorry, I'm not sure how to interpret your reply, and can't decide
> > whether it tries to justify why that tracked file should be ignored,
> > or explains that ignoring it was accidental.
> >
> > Anyway, ignoring that tracked file apparently triggered a nested
> > worktree-related bug in 'git clean', which can lead to data loss:
> >
> > https://public-inbox.org/git/20190825185918.3909-1-szeder.dev@gmail.com/
Whoa. At least we found a bug via my oversight ;-)
> Basically manifests are a build artefact from Visual Studio [1], so it was
> just another file to be ignored, from a _source_ control control viewpoint.

More precisely, manifest files are something specific to Windows, where you can embed metadata in an executable. Visual Studio auto-generated it under certain circumstances, but recent versions seem not to do that anymore.

Ciao, Dscho

Show 18 quoted lines
> I hadn't fully appreciated the reason for your question, but I can now see how
> the general 'ignore most, but keep an occasional' file type can be a problem
> for the `git clean` filter, along with sub-module repos in sub-directories. It
> probably extends beyond this special case .manifest file.
>
> I doubt that dscho wants to also do file renaming to achieve the trick that
> added that file to avoid this. the clean command should never be ignoring (and
> possibly deleting) tracked files.
>
> When clean hits a nested repo (maybe with .git directory - not sure of some of
> the sub-module changes) then it should stop referring to that top level
> gitignore, at least that's my expectation. The commit description in the
> referenced patch appears to get the two parts inter-twined.
>
> Philip
> [1]
> https://docs.microsoft.com/en-us/cpp/build/manifest-generation-in-visual-studio?view=vs-2019
>
Previous: Johannes SchindelinNext: Junio C Hamano
Message 49 of 63 in “Reinstate support for Visual Studio”
  1. 00/24 Reinstate support for Visual StudioJohannes Schindelin via GitGitGadget, Jul 18, 2019
  2. 01/24 Vcproj.pm: auto-generate GUIDsJohannes Schindelin via GitGitGadget, Jul 18, 2019
  3. 03/24 Vcproj.pm: do not configure VCWebServiceProxyGeneratorToolJohannes Schindelin via GitGitGadget, Jul 18, 2019
  4. 02/24 Vcproj.pm: list git.exe first to be startup projectPhilip Oakley via GitGitGadget, Jul 18, 2019
  5. 09/24 contrib/buildsystems: ignore gettext stuffPhilip Oakley via GitGitGadget, Jul 18, 2019
  6. 06/24 contrib/buildsystems: ignore irrelevant files in Generators/Johannes Schindelin via GitGitGadget, Jul 18, 2019
  7. 07/24 contrib/buildsystems: fix misleading error messagePhilip Oakley via GitGitGadget, Jul 18, 2019
  8. 05/24 contrib/buildsystems: ignore invalidcontinue.objPhilip Oakley via GitGitGadget, Jul 18, 2019
  9. 10/24 contrib/buildsystems: redirect errors of the dry run into a log filePhilip Oakley via GitGitGadget, Jul 18, 2019
  10. 11/24 contrib/buildsystems: optionally capture the dry-run in a filePhilip Oakley via GitGitGadget, Jul 18, 2019
  11. 15/24 contrib/buildsystems: also handle -lexpatJohannes Schindelin via GitGitGadget, Jul 18, 2019
  12. 13/24 contrib/buildsystems: handle the curl library optionPhilip Oakley via GitGitGadget, Jul 18, 2019
  13. 12/24 contrib/buildsystems: error out on unknown optionJohannes Schindelin via GitGitGadget, Jul 18, 2019
  14. 18/24 msvc: add a Makefile target to pre-generate the Visual Studio solutionJohannes Schindelin via GitGitGadget, Jul 18, 2019
  15. 20/24 .gitignore: touch up the entries regarding Visual StudioPhilip Oakley via GitGitGadget, Jul 18, 2019
  16. 17/24 contrib/buildsystems: add a backend for modern Visual Studio versionsJohannes Schindelin via GitGitGadget, Jul 18, 2019
  17. 22/24 bin-wrappers: append `.exe` to target paths if necessaryJohannes Schindelin via GitGitGadget, Jul 18, 2019
  18. 24/24 git: avoid calling aliased builtins via their dashed formJohannes Schindelin via GitGitGadget, Jul 18, 2019
  19. 23/24 t5505,t5516: create .git/branches/ when neededJohannes Schindelin via GitGitGadget, Jul 18, 2019
  20. Junio C HamanoJul 18, 2019
  21. Johannes SchindelinJul 19, 2019
  22. Junio C HamanoJul 19, 2019
  23. Junio C HamanoJul 19, 2019
  24. Junio C HamanoJul 19, 2019
  25. 14/24 contrib/buildsystems: handle libiconv, tooJohannes Schindelin via GitGitGadget, Jul 18, 2019
  26. 21/24 .gitignore: ignore Visual Studio's temporary/generated filesJohannes Schindelin via GitGitGadget, Jul 18, 2019
  27. 19/24 vcxproj: also link-or-copy builtinsJohannes Schindelin via GitGitGadget, Jul 18, 2019
  28. 16/24 contrib/buildsystems: handle options starting with a slashJohannes Schindelin via GitGitGadget, Jul 18, 2019
  29. 08/24 contrib/buildsystems: handle quoted spaces in filenamesPhilip Oakley via GitGitGadget, Jul 18, 2019
  30. 04/24 Vcproj.pm: urlencode '<' and '>' when generating VC projectsJohannes Schindelin via GitGitGadget, Jul 18, 2019
  31. 00/23 Reinstate support for Visual StudioJohannes Schindelin via GitGitGadget, Jul 29, 2019
  32. 01/23 Vcproj.pm: auto-generate GUIDsJohannes Schindelin via GitGitGadget, Jul 29, 2019
  33. 02/23 Vcproj.pm: list git.exe first to be startup projectPhilip Oakley via GitGitGadget, Jul 29, 2019
  34. 03/23 Vcproj.pm: do not configure VCWebServiceProxyGeneratorToolJohannes Schindelin via GitGitGadget, Jul 29, 2019
  35. 04/23 Vcproj.pm: urlencode '<' and '>' when generating VC projectsJohannes Schindelin via GitGitGadget, Jul 29, 2019
  36. 05/23 contrib/buildsystems: ignore invalidcontinue.objPhilip Oakley via GitGitGadget, Jul 29, 2019
  37. 11/23 contrib/buildsystems: optionally capture the dry-run in a filePhilip Oakley via GitGitGadget, Jul 29, 2019
  38. 12/23 contrib/buildsystems: error out on unknown optionJohannes Schindelin via GitGitGadget, Jul 29, 2019
  39. 16/23 contrib/buildsystems: handle options starting with a slashJohannes Schindelin via GitGitGadget, Jul 29, 2019
  40. 15/23 contrib/buildsystems: also handle -lexpatJohannes Schindelin via GitGitGadget, Jul 29, 2019
  41. 17/23 contrib/buildsystems: add a backend for modern Visual Studio versionsJohannes Schindelin via GitGitGadget, Jul 29, 2019
  42. 20/23 .gitignore: touch up the entries regarding Visual StudioPhilip Oakley via GitGitGadget, Jul 29, 2019
  43. SZEDER GáborAug 25, 2019
  44. Philip OakleyAug 25, 2019
  45. SZEDER GáborAug 25, 2019
  46. Philip OakleyAug 25, 2019
  47. SZEDER GáborAug 26, 2019
  48. Johannes SchindelinAug 28, 2019
  49. Johannes SchindelinAug 26, 2019
  50. Junio C HamanoAug 26, 2019
  51. 21/23 .gitignore: ignore Visual Studio's temporary/generated filesJohannes Schindelin via GitGitGadget, Jul 29, 2019
  52. 23/23 git: avoid calling aliased builtins via their dashed formJohannes Schindelin via GitGitGadget, Jul 29, 2019
  53. 14/23 contrib/buildsystems: handle libiconv, tooJohannes Schindelin via GitGitGadget, Jul 29, 2019
  54. 19/23 vcxproj: also link-or-copy builtinsJohannes Schindelin via GitGitGadget, Jul 29, 2019
  55. 22/23 bin-wrappers: append `.exe` to target paths if necessaryJohannes Schindelin via GitGitGadget, Jul 29, 2019
  56. 18/23 msvc: add a Makefile target to pre-generate the Visual Studio solutionJohannes Schindelin via GitGitGadget, Jul 29, 2019
  57. 10/23 contrib/buildsystems: redirect errors of the dry run into a log filePhilip Oakley via GitGitGadget, Jul 29, 2019
  58. 06/23 contrib/buildsystems: ignore irrelevant files in Generators/Johannes Schindelin via GitGitGadget, Jul 29, 2019
  59. 13/23 contrib/buildsystems: handle the curl library optionPhilip Oakley via GitGitGadget, Jul 29, 2019
  60. 09/23 contrib/buildsystems: ignore gettext stuffPhilip Oakley via GitGitGadget, Jul 29, 2019
  61. 07/23 contrib/buildsystems: fix misleading error messagePhilip Oakley via GitGitGadget, Jul 29, 2019
  62. 08/23 contrib/buildsystems: handle quoted spaces in filenamesPhilip Oakley via GitGitGadget, Jul 29, 2019
  63. Junio C HamanoJul 29, 2019

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.