Skip to content

Commit 99ef1e5

Browse files
committed
Merge branch 'inherit-only-stdhandles'
When spawning child processes, we do want them to inherit the standard handles so that we can talk to them. We do *not* want them to inherit any other handle, as that would hold a lock to the respective files (preventing them from being renamed, modified or deleted), and the child process would not know how to access that handle anyway. Happily, there is an API to make that happen. It is supported in Windows Vista and later, which is exactly what we promise to support in Git for Windows for the time being. This also means that we lift, at long last, the target Windows version from Windows XP to Windows Vista. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 08f5629 + 08fd204 commit 99ef1e5

File tree

122 files changed

+7798
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+7798
-626
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.pl eof=lf diff=perl
66
*.pm eol=lf diff=perl
77
*.py eol=lf diff=python
8+
*.bat eol=crlf
89
/Documentation/**/*.txt eol=lf
910
/command-list.txt eol=lf
1011
/GIT-VERSION-GEN eol=lf

.gitignore

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
/git-interpret-trailers
8484
/git-instaweb
8585
/git-legacy-rebase
86+
/git-legacy-stash
8687
/git-log
8788
/git-ls-files
8889
/git-ls-remote
@@ -190,6 +191,42 @@
190191
/gitweb/static/gitweb.js
191192
/gitweb/static/gitweb.min.*
192193
/command-list.h
194+
/libgit
195+
/test-chmtime
196+
/test-ctype
197+
/test-config
198+
/test-date
199+
/test-delta
200+
/test-dump-cache-tree
201+
/test-dump-split-index
202+
/test-dump-untracked-cache
203+
/test-fake-ssh
204+
/test-scrap-cache-tree
205+
/test-genrandom
206+
/test-hashmap
207+
/test-index-version
208+
/test-line-buffer
209+
/test-match-trees
210+
/test-mergesort
211+
/test-mktemp
212+
/test-parse-options
213+
/test-path-utils
214+
/test-prio-queue
215+
/test-read-cache
216+
/test-regex
217+
/test-revision-walking
218+
/test-run-command
219+
/test-sha1
220+
/test-sha1-array
221+
/test-sigchain
222+
/test-string-list
223+
/test-submodule-config
224+
/test-subprocess
225+
/test-svn-fe
226+
/test-urlmatch-normalization
227+
/test-wildmatch
228+
/vcs-svn_lib
229+
/xdiff_lib
193230
*.tar.gz
194231
*.dsc
195232
*.deb
@@ -227,6 +264,15 @@
227264
*.user
228265
*.idb
229266
*.pdb
230-
/Debug/
231-
/Release/
267+
*.ilk
268+
*.iobj
269+
*.ipdb
270+
*.dll
271+
.vs/
272+
*.manifest
273+
Debug/
274+
Release/
275+
/UpgradeLog*.htm
276+
/git.VC.VC.opendb
277+
/git.VC.db
232278
*.dSYM

Documentation/Makefile

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ docdep_prereqs = \
294294
cmd-list.made $(cmds_txt)
295295

296296
doc.dep : $(docdep_prereqs) $(wildcard *.txt) $(wildcard config/*.txt) build-docdep.perl
297-
$(QUIET_GEN)$(RM) $@+ $@ && \
298-
$(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
299-
mv $@+ $@
297+
$(QUIET_GEN)$(RM) $@.new $@ && \
298+
$(PERL_PATH) ./build-docdep.perl >$@.new $(QUIET_STDERR) && \
299+
mv $@.new $@
300300

301301
-include doc.dep
302302

@@ -332,8 +332,8 @@ mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
332332
date >$@
333333

334334
clean:
335-
$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
336-
$(RM) *.texi *.texi+ *.texi++ git.info gitman.info
335+
$(RM) *.xml *.xml.new *.html *.html.new *.1 *.5 *.7
336+
$(RM) *.texi *.texi.new *.texi.new.new git.info gitman.info
337337
$(RM) *.pdf
338338
$(RM) howto-index.txt howto/*.html doc.dep
339339
$(RM) technical/*.html technical/api-index.txt
@@ -342,14 +342,14 @@ clean:
342342
$(RM) manpage-base-url.xsl
343343

344344
$(MAN_HTML): %.html : %.txt asciidoc.conf
345-
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
346-
$(TXT_TO_HTML) -d manpage -o $@+ $< && \
347-
mv $@+ $@
345+
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
346+
$(TXT_TO_HTML) -d manpage -o $@.new $< && \
347+
mv $@.new $@
348348

349349
$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
350-
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
351-
$(TXT_TO_HTML) -o $@+ $< && \
352-
mv $@+ $@
350+
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
351+
$(TXT_TO_HTML) -o $@.new $< && \
352+
mv $@.new $@
353353

354354
manpage-base-url.xsl: manpage-base-url.xsl.in
355355
$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
@@ -359,14 +359,14 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
359359
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
360360

361361
%.xml : %.txt asciidoc.conf
362-
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
363-
$(TXT_TO_XML) -d manpage -o $@+ $< && \
364-
mv $@+ $@
362+
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
363+
$(TXT_TO_XML) -d manpage -o $@.new $< && \
364+
mv $@.new $@
365365

366366
user-manual.xml: user-manual.txt user-manual.conf
367-
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
368-
$(TXT_TO_XML) -d book -o $@+ $< && \
369-
mv $@+ $@
367+
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
368+
$(TXT_TO_XML) -d book -o $@.new $< && \
369+
mv $@.new $@
370370

371371
technical/api-index.txt: technical/api-index-skel.txt \
372372
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
@@ -383,46 +383,46 @@ XSLT = docbook.xsl
383383
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
384384

385385
user-manual.html: user-manual.xml $(XSLT)
386-
$(QUIET_XSLTPROC)$(RM) $@+ $@ && \
387-
xsltproc $(XSLTOPTS) -o $@+ $(XSLT) $< && \
388-
mv $@+ $@
386+
$(QUIET_XSLTPROC)$(RM) $@.new $@ && \
387+
xsltproc $(XSLTOPTS) -o $@.new $(XSLT) $< && \
388+
mv $@.new $@
389389

390390
git.info: user-manual.texi
391391
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi
392392

393393
user-manual.texi: user-manual.xml
394-
$(QUIET_DB2TEXI)$(RM) $@+ $@ && \
395-
$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \
396-
$(PERL_PATH) fix-texi.perl <$@++ >$@+ && \
397-
rm $@++ && \
398-
mv $@+ $@
394+
$(QUIET_DB2TEXI)$(RM) $@.new $@ && \
395+
$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@.new.new && \
396+
$(PERL_PATH) fix-texi.perl <$@.new.new >$@.new && \
397+
rm $@.new.new && \
398+
mv $@.new $@
399399

400400
user-manual.pdf: user-manual.xml
401-
$(QUIET_DBLATEX)$(RM) $@+ $@ && \
402-
$(DBLATEX) -o $@+ $(DBLATEX_COMMON) $< && \
403-
mv $@+ $@
401+
$(QUIET_DBLATEX)$(RM) $@.new $@ && \
402+
$(DBLATEX) -o $@.new $(DBLATEX_COMMON) $< && \
403+
mv $@.new $@
404404

405405
gitman.texi: $(MAN_XML) cat-texi.perl texi.xsl
406-
$(QUIET_DB2TEXI)$(RM) $@+ $@ && \
407-
($(foreach xml,$(sort $(MAN_XML)),xsltproc -o $(xml)+ texi.xsl $(xml) && \
408-
$(DOCBOOK2X_TEXI) --encoding=UTF-8 --to-stdout $(xml)+ && \
409-
rm $(xml)+ &&) true) > $@++ && \
410-
$(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \
411-
rm $@++ && \
412-
mv $@+ $@
406+
$(QUIET_DB2TEXI)$(RM) $@.new $@ && \
407+
($(foreach xml,$(sort $(MAN_XML)),xsltproc -o $(xml).new texi.xsl $(xml) && \
408+
$(DOCBOOK2X_TEXI) --encoding=UTF-8 --to-stdout $(xml).new && \
409+
rm $(xml).new &&) true) > $@.new.new && \
410+
$(PERL_PATH) cat-texi.perl $@ <$@.new.new >$@.new && \
411+
rm $@.new.new && \
412+
mv $@.new $@
413413

414414
gitman.info: gitman.texi
415415
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split --no-validate $*.texi
416416

417417
$(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
418-
$(QUIET_DB2TEXI)$(RM) $@+ $@ && \
419-
$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \
420-
mv $@+ $@
418+
$(QUIET_DB2TEXI)$(RM) $@.new $@ && \
419+
$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@.new && \
420+
mv $@.new $@
421421

422422
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
423-
$(QUIET_GEN)$(RM) $@+ $@ && \
424-
'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
425-
mv $@+ $@
423+
$(QUIET_GEN)$(RM) $@.new $@ && \
424+
'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@.new && \
425+
mv $@.new $@
426426

427427
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
428428
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
@@ -431,10 +431,10 @@ WEBDOC_DEST = /pub/software/scm/git/docs
431431

432432
howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
433433
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
434-
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
434+
$(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
435435
sed -e '1,/^$$/d' $< | \
436-
$(TXT_TO_HTML) - >$@+ && \
437-
mv $@+ $@
436+
$(TXT_TO_HTML) - >$@.new && \
437+
mv $@.new $@
438438

439439
install-webdoc : html
440440
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)

Documentation/config.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ the Git commands' behavior. The files `.git/config` and optionally
77
repository are used to store the configuration for that repository, and
88
`$HOME/.gitconfig` is used to store a per-user configuration as
99
fallback values for the `.git/config` file. The file `/etc/gitconfig`
10-
can be used to store a system-wide default configuration.
10+
can be used to store a system-wide default configuration. On Windows,
11+
configuration can also be stored in `C:\ProgramData\Git\config`; This
12+
file will be used also by libgit2-based software.
1113

1214
The configuration variables are used by both the Git plumbing
1315
and the porcelains. The variables are divided into sections, wherein

Documentation/config/add.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ add.ignore-errors (deprecated)::
55
option of linkgit:git-add[1]. `add.ignore-errors` is deprecated,
66
as it does not follow the usual naming convention for configuration
77
variables.
8+
9+
add.interactive.useBuiltin::
10+
[EXPERIMENTAL] Set to `true` to use the experimental built-in
11+
implementation of the interactive version of linkgit:git-add[1]
12+
instead of the Perl script version. Is `false` by default.

Documentation/git-config.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,16 @@ FILES
270270
If not set explicitly with `--file`, there are four files where
271271
'git config' will search for configuration options:
272272

273+
$PROGRAMDATA/Git/config::
274+
(Windows-only) System-wide configuration file shared with other Git
275+
implementations. Typically `$PROGRAMDATA` points to `C:\ProgramData`.
276+
273277
$(prefix)/etc/gitconfig::
274278
System-wide configuration file.
279+
(Windows-only) This file contains only the settings which are
280+
specific for this installation of Git for Windows and which should
281+
not be shared with other Git implementations like JGit, libgit2.
282+
`--system` will select this file.
275283

276284
$XDG_CONFIG_HOME/git/config::
277285
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set

Documentation/git-reset.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SYNOPSIS
1010
[verse]
1111
'git reset' [-q] [<tree-ish>] [--] <paths>...
1212
'git reset' (--patch | -p) [<tree-ish>] [--] [<paths>...]
13+
EXPERIMENTAL: 'git reset' [-q] [--stdin [-z]] [<tree-ish>]
1314
'git reset' [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]
1415

1516
DESCRIPTION
@@ -100,6 +101,15 @@ OPTIONS
100101
`reset.quiet` config option. `--quiet` and `--no-quiet` will
101102
override the default behavior.
102103

104+
--stdin::
105+
EXPERIMENTAL: Instead of taking list of paths from the
106+
command line, read list of paths from the standard input.
107+
Paths are separated by LF (i.e. one path per line) by
108+
default.
109+
110+
-z::
111+
EXPERIMENTAL: Only meaningful with `--stdin`; paths are
112+
separated with NUL character instead of LF.
103113

104114
EXAMPLES
105115
--------

Documentation/git-stash.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git stash' list [<options>]
12-
'git stash' show [<stash>]
12+
'git stash' show [<options>] [<stash>]
1313
'git stash' drop [-q|--quiet] [<stash>]
1414
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
1515
'git stash' branch <branchname> [<stash>]
@@ -106,7 +106,7 @@ stash@{1}: On master: 9cc0589... Add git-stash
106106
The command takes options applicable to the 'git log'
107107
command to control what is shown and how. See linkgit:git-log[1].
108108

109-
show [<stash>]::
109+
show [<options>] [<stash>]::
110110

111111
Show the changes recorded in the stash entry as a diff between the
112112
stashed contents and the commit back when the stash entry was first

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ for further details.
567567

568568
`GIT_CONFIG_NOSYSTEM`::
569569
Whether to skip reading settings from the system-wide
570-
`$(prefix)/etc/gitconfig` file. This environment variable can
570+
`$(prefix)/etc/gitconfig` file (and on Windows, also from the
571+
`%PROGRAMDATA%\Git\config` file). This environment variable can
571572
be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
572573
predictable environment for a picky script, or you can set it
573574
temporarily to avoid using a buggy `/etc/gitconfig` file while

Documentation/gitattributes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ automatic line ending conversion based on your platform.
346346

347347
Use the following attributes if your '*.ps1' files are UTF-16 little
348348
endian encoded without BOM and you want Git to use Windows line endings
349-
in the working directory (use `UTF-16-LE-BOM` instead of `UTF-16LE` if
349+
in the working directory (use `UTF-16LE-BOM` instead of `UTF-16LE` if
350350
you want UTF-16 little endian with BOM).
351351
Please note, it is highly recommended to
352352
explicitly define the line endings with `eol` if the `working-tree-encoding`

0 commit comments

Comments
 (0)