Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.97k stars 560 forks source link

[PATCH] .gitignore Win32's miniperl object files #13353

Closed p5pRT closed 11 years ago

p5pRT commented 11 years ago

Migrated from rt.perl.org#120274 (status was 'resolved')

Searchable as RT120274$

p5pRT commented 11 years ago

From @bulk88

Created by @bulk88

See attached patch.

Perl Info ``` Flags: category=core severity=low Site configuration information for perl 5.19.5: Configured by Owner at Sun Oct 13 22:49:28 2013. Summary of my perl5 (revision 5 version 19 subversion 5) configuration: Derived from: b68084b8883aecdacceb57c6c6566503ba6a0fdd Platform: osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T', optimize='-O1 -MD -Zi -DNDEBUG -GL', cppflags='-DWIN32' ccversion='13.10.6030', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl519\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\lib" libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl519.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl519\lib\CORE" -machine:x86' Locally applied patches: uncommitted-changes @INC for perl 5.19.5: C:/perl519/site/lib C:/perl519/lib . Environment for perl 5.19.5: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\perl519\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem; PERL_BADLANG (unset) SHELL (unset) ```
p5pRT commented 11 years ago

From @bulk88

0001-.gitignore-Win32-s-miniperl-object-files.patch ```diff From 9d154f20b21814e09470063638c33eb79c2c0d5b Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Sat, 19 Oct 2013 21:26:29 -0400 Subject: [PATCH] .gitignore Win32's miniperl object files --- win32/.gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/win32/.gitignore b/win32/.gitignore index abffe47..c5fcdfc 100644 --- a/win32/.gitignore +++ b/win32/.gitignore @@ -4,6 +4,7 @@ /perl.base bin/*.bat html/ +mini/ Extensions_static dlutils.c perllibst.h -- 1.7.9.msysgit.0 ```
p5pRT commented 11 years ago

From @steve-m-hay

Why is this patch necessary?

I think Git doesn't track folders\, and the .obj files in win32/mini (there is nothing in that folder other than .obj files) are already .gitignored by the top-level .gitignore file.

If I do a complete build and run "git status" or open "git gui" then none of win32/mini/* shows up as untracked files\, even without your patch.

p5pRT commented 11 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 11 years ago

From @bulk88

On Mon Oct 21 00​:45​:25 2013\, shay wrote​:

Why is this patch necessary?

I think Git doesn't track folders\, and the .obj files in win32/mini (there is nothing in that folder other than .obj files) are already .gitignored by the top-level .gitignore file.

If I do a complete build and run "git status" or open "git gui" then none of win32/mini/* shows up as untracked files\, even without your patch.

A git status.

__________________________________________ ...... # modified​: ../../warnings.h # modified​: ../Makefile # modified​: ../makefile.mk # modified​: ../win32.c # # Untracked files​: # (use "git add \..." to include in what will be committed) # # ../../cpan/CPAN-Meta/t/data-fixable/ # ../../cpan/CPAN-Meta/t/data-test/ # ../../cpan/CPAN-Meta/t/data-valid/ # ../../cpan/Test-Harness/lib/TAP/Harness/Env.pm # ../../cpan/podlators/t/man-empty.t # ../../cpan/podlators/t/text-empty.t # ../../ext/File-Glob/t/threads.t # ../../lib/unicore/BidiBrackets.txt # ../../maptest.pl # ../../op-free-defer.diff # ../../op.c.orig # ../../t/op/postfixderef.t # ../../t/utf1800.pl # ../../t/utf2420.pl # ../../t/utf300.pl # ../../t/utf3264.pl # ../../t/utf3932.pl # ../Thumbs.db # ../buildperlexe.bat # ../rebuild.bat # ../t.txt no changes added to commit (use "git add" and/or "git commit -a")

Owner@​OWNER-5D26B85EE /c/perl519/src/win32/mini (blead) $ _______________________________________________

but\, the GUI says they are untracked. If I add the patch\, and ignore the /mini folder\, the GUI says ignored. 2 screenshots included of before and after the patch. But also\, git clean without the patch\, git clean -d -f -X won't delete the directory (/win32/mini) or delete the object files inside for me\, so its not a 100% TortoiseGit (GUI) problem.

_______________________________________________ ...................... Removing t/perl519.pdb Removing t/perlglob.exe Removing t/vc70.pdb Removing taint.obj Removing toke.obj Removing universal.obj Removing utf8.obj Removing util.obj Removing utils/Makefile Removing utils/c2ph Removing utils/c2ph.bat Removing utils/config_data Removing utils/config_data.bat Removing utils/corelist Removing utils/corelist.bat Removing utils/cpan Removing utils/cpan.bat Removing utils/enc2xs Removing utils/enc2xs.bat Removing utils/h2ph Removing utils/h2ph.bat Removing utils/h2xs Removing utils/h2xs.bat Removing utils/instmodsh Removing utils/instmodsh.bat Removing utils/json_pp Removing utils/json_pp.bat Removing utils/libnetcfg Removing utils/libnetcfg.bat Removing utils/perlbug Removing utils/perlbug.bat Removing utils/perldoc Removing utils/perldoc.bat Removing utils/perlivp Removing utils/perlivp.bat Removing utils/piconv Removing utils/piconv.bat Removing utils/pl2pm Removing utils/pl2pm.bat Removing utils/pod2html Removing utils/pod2html.bat Removing utils/prove Removing utils/prove.bat Removing utils/pstruct Removing utils/pstruct.bat Removing utils/ptar Removing utils/ptar.bat Removing utils/ptardiff Removing utils/ptardiff.bat Removing utils/ptargrep Removing utils/ptargrep.bat Removing utils/shasum Removing utils/shasum.bat Removing utils/splain Removing utils/splain.bat Removing utils/xsubpp Removing utils/xsubpp.bat Removing utils/zipdetails Removing utils/zipdetails.bat Removing uudmap.h Removing win32/Extensions_static Removing win32/bin/exetype.bat Removing win32/bin/perlglob.bat Removing win32/bin/pl2bat.bat Removing win32/bin/runperl.bat Removing win32/bin/search.bat Removing win32/config.h Removing win32/config.w32 Removing win32/fcrypt.obj Removing win32/perldll.def Removing win32/perlexe.RES Removing win32/perlglob.obj Removing win32/perllib.obj Removing win32/perllibst.h Removing win32/perlmain.c Removing win32/perlmain.obj Removing win32/sv.i Removing win32/vc70.pdb Removing win32/win32.obj Removing win32/win32io.obj Removing win32/win32sck.obj Removing win32/win32thread.obj Removing wperl.exe Removing x2p/a2p.exe Removing x2p/a2p.obj Removing x2p/a2p.pdb Removing x2p/find2perl Removing x2p/find2perl.bat Removing x2p/hash.obj Removing x2p/psed Removing x2p/psed.bat Removing x2p/s2p Removing x2p/s2p.bat Removing x2p/str.obj Removing x2p/util.obj Removing x2p/walk.obj

Owner@​OWNER-5D26B85EE /c/perl519/src (blead) $ git clean -d -f -X ____________________________________________________

-- bulk88 ~ bulk88 at hotmail.com

p5pRT commented 11 years ago

From @bulk88

win32minigitgui.PNG

p5pRT commented 11 years ago

From @bulk88

win32minigitgui-ignored.PNG

p5pRT commented 11 years ago

From @steve-m-hay

On 21 October 2013 15​:01\, bulk88 via RT \perlbug\-followup@​perl\.org wrote​:

On Mon Oct 21 00​:45​:25 2013\, shay wrote​:

Why is this patch necessary?

I think Git doesn't track folders\, and the .obj files in win32/mini (there is nothing in that folder other than .obj files) are already .gitignored by the top-level .gitignore file.

If I do a complete build and run "git status" or open "git gui" then none of win32/mini/* shows up as untracked files\, even without your patch.

A git status.

__________________________________________ ...... # modified​: ../../warnings.h # modified​: ../Makefile # modified​: ../makefile.mk # modified​: ../win32.c # # Untracked files​: # (use "git add \..." to include in what will be committed) # # ../../cpan/CPAN-Meta/t/data-fixable/ # ../../cpan/CPAN-Meta/t/data-test/ # ../../cpan/CPAN-Meta/t/data-valid/ # ../../cpan/Test-Harness/lib/TAP/Harness/Env.pm # ../../cpan/podlators/t/man-empty.t # ../../cpan/podlators/t/text-empty.t # ../../ext/File-Glob/t/threads.t # ../../lib/unicore/BidiBrackets.txt # ../../maptest.pl # ../../op-free-defer.diff # ../../op.c.orig # ../../t/op/postfixderef.t # ../../t/utf1800.pl # ../../t/utf2420.pl # ../../t/utf300.pl # ../../t/utf3264.pl # ../../t/utf3932.pl # ../Thumbs.db # ../buildperlexe.bat # ../rebuild.bat # ../t.txt no changes added to commit (use "git add" and/or "git commit -a")

Owner@​OWNER-5D26B85EE /c/perl519/src/win32/mini (blead) $ _______________________________________________

but\, the GUI says they are untracked. If I add the patch\, and ignore the /mini folder\, the GUI says ignored. 2 screenshots included of before and

To my mind that's a TortoiseGit problem but I may be wrong. I haven't started using that yet so haven't encountered it myself. I've no objection to adding a .gitignore line to keep it happy though.

after the patch. But also\, git clean without the patch\, git clean -d -f -X won't delete the directory (/win32/mini) or delete the object files inside for me\, so its not a 100% TortoiseGit (GUI) problem.

I see the same with git clean -dfX\, but I normally use git clean -dfx\, which does remove the whole win32/mini folder.

p5pRT commented 11 years ago

From @bulk88

On Mon Oct 21 07​:23​:29 2013\, shay wrote​:

after the patch. But also\, git clean without the patch\, git clean -d -f -X won't delete the directory (/win32/mini) or delete the object files inside for me\, so its not a 100% TortoiseGit (GUI) problem.

I see the same with git clean -dfX\, but I normally use git clean -dfx\, which does remove the whole win32/mini folder.

-x would kill other untracked helper files I keep the build dir for personal reasons\, so I always use -x\, not -X. So we both agree that on your machine and mine that git clean -x isn't deleting /win32/mini obj files for some unknown reason?

I say all build products should be ignored\, and that means a clean -x should delete them. Its a bug somewhere (in git or perl) if they aren't deleted after a git clean -x?

-- bulk88 ~ bulk88 at hotmail.com

p5pRT commented 11 years ago

From @steve-m-hay

On 21 October 2013 16​:52\, bulk88 via RT \perlbug\-followup@​perl\.org wrote​:

On Mon Oct 21 07​:23​:29 2013\, shay wrote​:

after the patch. But also\, git clean without the patch\, git clean -d -f -X won't delete the directory (/win32/mini) or delete the object files inside for me\, so its not a 100% TortoiseGit (GUI) problem.

I see the same with git clean -dfX\, but I normally use git clean -dfx\, which does remove the whole win32/mini folder.

-x would kill other untracked helper files I keep the build dir for personal reasons\, so I always use -x\, not -X. So we both agree that on your machine and mine that git clean -x isn't deleting /win32/mini obj files for some unknown reason?

I say all build products should be ignored\, and that means a clean -x should delete them. Its a bug somewhere (in git or perl) if they aren't deleted after a git clean -x?

I think you've got -x and -X muddled up in some of the above.

-x removes all untracked files\, which I do\, but you prefer not to do. -X only removes .gitignored files\, which is what you want.

git clean -x removes win32/mini/*.obj as expected git clean -X does not\, which seems like a bug in git given that *.obj is already .gitignored

I'm happy to apply your patch to workaround the apparent bug in git clean -X (and also the TortoiseGit anomaly mentioned previously).

p5pRT commented 11 years ago

From @bulk88

On Mon Oct 21 09​:56​:41 2013\, shay wrote​:

I think you've got -x and -X muddled up in some of the above.

-x removes all untracked files\, which I do\, but you prefer not to do. -X only removes .gitignored files\, which is what you want.

Yes I did mess it up above.

git clean -x removes win32/mini/*.obj as expected git clean -X does not\, which seems like a bug in git given that *.obj is already .gitignored

I'm happy to apply your patch to workaround the apparent bug in git clean -X (and also the TortoiseGit anomaly mentioned previously).

Ok.

-- bulk88 ~ bulk88 at hotmail.com

p5pRT commented 11 years ago

From @steve-m-hay

Thank you for the patch.

Now applied in commit 72905adc09 with an expanded commit message to explain why it was necessary.

p5pRT commented 11 years ago

From [Unknown Contact. See original ticket]

Thank you for the patch.

Now applied in commit 72905adc09 with an expanded commit message to explain why it was necessary.

p5pRT commented 11 years ago

@steve-m-hay - Status changed from 'open' to 'resolved'