Skip to content

Rebase to v2.49.0 #5487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 359 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
43f9bbd
hash-object: add another >4GB/LLP64 test case
PhilipOakley Dec 6, 2021
37089cb
setup: properly use "%(prefix)/" when in WSL
derrickstolee Apr 13, 2022
eb2c4b4
init: do parse _all_ core.* settings early
dscho Sep 8, 2021
721f99a
hash-object: add a >4GB/LLP64 test case using filtered input
PhilipOakley Dec 7, 2021
8537e4e
compat/mingw.c: do not warn when failing to get owner
derrickstolee Apr 13, 2022
11f6fbd
mingw: $env:TERM="xterm-256color" for newer OSes
rkitover Apr 12, 2022
beeb830
winansi: check result and Buffer before using Name
1480c1 May 28, 2022
551cfe6
config.mak.uname: add support for clangarm64
dennisameling Oct 4, 2022
6d3e5cf
msvc: do handle builds on Windows/ARM64
dscho Feb 25, 2025
e88076e
Add config option `windows.appendAtomically`
sunzhuoshi Jan 15, 2022
5398cd9
mingw: change core.fsyncObjectFiles = 1 by default
dscho Sep 4, 2017
5046722
MinGW: link as terminal server aware
rimrul Jul 10, 2022
e9e45cb
Fix Windows version resources
Mortein Nov 2, 2022
e6aed4b
bswap.h: add support for built-in bswap functions
dennisameling Oct 4, 2022
d31e375
mingw(arm64): do move the `/etc/git*` location
dscho Feb 25, 2025
905c9fd
http: optionally load libcurl lazily
dscho May 6, 2023
14f7f33
http: support lazy-loading libcurl also on Windows
dscho May 7, 2023
de2514d
http: when loading libcurl lazily, allow for multiple SSL backends
dscho May 7, 2023
418bbe6
status: fix for old-style submodules with commondir
sceptical-coder Oct 28, 2022
f7f17bc
windows: skip linking `git-<command>` for built-ins
dscho Jan 27, 2023
285ca8a
windows: fix Repository>Explore Working Copy
dscho Mar 21, 2023
f541881
mingw: do load libcurl dynamically by default
dscho May 7, 2023
1133396
Add a GitHub workflow to verify that Git/Scalar work in Nano Server
dscho Nov 2, 2022
738b64d
mingw: suggest `windows.appendAtomically` in more cases
dsl101 Jul 28, 2023
b554f2b
win32: use native ANSI sequence processing, if possible
dscho Nov 22, 2023
0c97108
git.rc: include winuser.h
rimrul Dec 2, 2023
32e6593
common-main.c: fflush stdout buffer upon exit
chengzhuo5 Apr 8, 2024
83013cc
t5601/t7406(mingw): do run tests with symlink support
dscho Apr 9, 2024
31f14a7
win32: ensure that `localtime_r()` is declared even in i686 builds
dscho May 21, 2024
d6aa1bb
Fallback to AppData if XDG_CONFIG_HOME is unset
ariellourenco Jul 2, 2024
e28c964
run-command: be helpful with Git LFS fails on Windows 7
dscho Jul 4, 2024
9c7962f
ci: work around a problem with HTTP/2 vs libcurl v8.10.0
dscho Sep 24, 2024
8bc5a28
revision: create mark_trees_uninteresting_dense()
derrickstolee Sep 6, 2024
977c6d6
pack-objects: extract should_attempt_deltas()
derrickstolee Sep 24, 2024
f9dec41
pack-objects: add --path-walk option
derrickstolee Sep 5, 2024
9388ecb
pack-objects: introduce GIT_TEST_PACK_PATH_WALK
derrickstolee Sep 6, 2024
ba06d19
repack: add --path-walk option
derrickstolee Sep 5, 2024
b74589a
pack-objects: enable --path-walk via config
derrickstolee Sep 5, 2024
1e79420
scalar: enable path-walk during push via config
derrickstolee Sep 5, 2024
60b7fa0
survey: stub in new experimental 'git-survey' command
Apr 29, 2024
5debbd0
pack-objects: refactor path-walk delta phase
derrickstolee Sep 18, 2024
0abf509
survey: add command line opts to select references
Apr 29, 2024
ad79f1d
pack-objects: thread the path-based compression
derrickstolee Sep 18, 2024
d5f73ce
survey: start pretty printing data in table form
derrickstolee Sep 1, 2024
af65f40
survey: add object count summary
derrickstolee Sep 2, 2024
994c459
survey: summarize total sizes by object type
derrickstolee Sep 2, 2024
c655a26
survey: show progress during object walk
derrickstolee Sep 2, 2024
c596bba
survey: add ability to track prioritized lists
derrickstolee Sep 2, 2024
65fef57
survey: add report of "largest" paths
derrickstolee Sep 2, 2024
ace0427
survey: add --top=<N> option and config
derrickstolee Sep 23, 2024
628589f
survey: clearly note the experimental nature in the output
dscho Jul 1, 2024
2fa60ca
mingw: make sure `errno` is set correctly when socket operations fail
dscho Nov 14, 2019
6791d35
compat/mingw: handle WSA errors in strerror
rimrul Dec 22, 2024
968cfcc
compat/mingw: drop outdated comment
rimrul Dec 22, 2024
5f9ffaa
t0301: actually test credential-cache on Windows
rimrul Dec 29, 2024
69a2f61
Merge branch 'ci-fixes'
dscho Feb 11, 2021
021de74
credential-cache: handle ECONNREFUSED gracefully
rimrul Dec 22, 2024
4a9d6d6
mingw_open_existing: handle directories better
rimrul Jan 4, 2025
8acd72b
mingw: drop Windows 7-specific work-around
dscho Mar 4, 2025
9baeaba
Merge 'remote-hg-prerequisites' into HEAD
dscho Jun 8, 2018
3b35d27
Merge branch 'drive-prefix'
dscho Jun 8, 2018
cee1f47
Merge branch 'dont-clean-junctions'
dscho Jul 30, 2019
6bd890d
Merge branch 'msys2-python'
dscho May 31, 2019
f488ffc
Merge branch 'mimalloc-v2.0.9'
dscho Sep 8, 2022
2b79b8e
Merge pull request #2375 from assarbad/reintroduce-sideband-config
dscho Oct 30, 2019
06f99ad
Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
dscho Jan 3, 2020
66766b7
Merge pull request #2488 from bmueller84/master
dscho Jan 22, 2020
700e4b7
Merge pull request #2501 from jeffhostetler/clink-debug-curl
dscho Jan 30, 2020
8472122
Merge pull request #2504 from dscho/access-repo-via-junction
dscho Feb 1, 2020
b752916
Merge pull request #2506 from dscho/issue-2283
dscho Feb 11, 2020
4f06ba2
Merge pull request #2535 from dscho/schannel-revoke-best-effort
dscho Mar 4, 2020
001cc8c
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
dscho May 9, 2020
9aeac8c
Merge 'add-p-many-files'
dscho Jun 8, 2018
1600258
Merge pull request #2730 from dscho/crlf-aware-git-add-i
dscho Jul 2, 2020
36388cf
Merge pull request #2714 from lbonanomi/crlf-scissors
dscho Jul 3, 2020
0dba3d7
Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
dscho Oct 9, 2020
3980ff5
Merge 'git-gui/js/intent-to-add'
dscho Oct 18, 2020
99877ba
Merge pull request #2974 from derrickstolee/maintenance-and-headless
dscho Jan 11, 2021
c54c076
cmake: install headless-git. (#4338)
dscho Mar 13, 2023
3b21c1a
Merge pull request #2351 from PhilipOakley/vcpkg-tip
dscho Oct 7, 2019
4a3f286
Merge pull request #2915 from dennisameling/windows-arm64-support
dscho Dec 9, 2020
3b47f97
Merge pull request #3327 from dennisameling/fix-host-cpu
dscho Jul 19, 2021
30d77dd
Merge pull request #3165 from dscho/increase-allowed-length-of-interp…
dscho Apr 3, 2021
2f62584
Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
dscho May 17, 2021
07982ab
Merge pull request #3293 from pascalmuller/http-support-automatically…
dscho Jun 24, 2021
f8ff3b6
Merge pull request #3349 from vdye/feature/ci-subtree-tests
dscho Aug 10, 2021
c93b690
Merge pull request #3306 from PhilipOakley/vs-sln
dscho Oct 12, 2021
7792292
Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
dscho Oct 13, 2021
d232462
Merge pull request #3533 from PhilipOakley/hashliteral_t
dscho Dec 15, 2021
1698ab6
Merge pull request #3791: Various fixes around `safe.directory`
derrickstolee Apr 13, 2022
9358996
Merge pull request #3751 from rkitover/native-term
dscho Apr 21, 2022
54c1863
Merge pull request #3875 from 1480c1/wine/detect_msys_tty
dscho May 30, 2022
ad3a0b0
Merge branch 'optionally-dont-append-atomically-on-windows'
dscho Jun 23, 2022
da3bb78
Merge branch 'fsync-object-files-always'
dscho Oct 11, 2018
10a5588
Merge pull request #3942 from rimrul/mingw-tsaware
dscho Jul 27, 2022
265fe39
Fix Windows version resources (#4092)
dscho Nov 3, 2022
0d07f3f
Merge branch 'builtin-swap-functions'
dscho Nov 23, 2022
eb66942
Add support for CLANGARM64 target (#3916)
dscho Oct 28, 2022
a91f62d
Fix global repository field not being cleared (#4083)
dscho Dec 20, 2022
ef5f853
Skip linking the "dashed" `git-<command>`s for built-ins (#4252)
dscho Jan 31, 2023
849b513
Git GUI: fix Repository>Explore Working Copy (#4357)
dscho Mar 21, 2023
568dcdb
Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (…
dscho May 15, 2023
545abb5
Merge branch 'nano-server'
dscho Aug 7, 2023
185550f
Additional error checks for issuing the windows.appendAtomically warn…
dscho Aug 7, 2023
b68524f
win32: use native ANSI sequence processing, if possible (#4700)
dscho Dec 2, 2023
4c2bd04
ARM64: Embed manifest properly (#4718)
dscho Dec 7, 2023
0923ca9
common-main.c: fflush stdout buffer when exit (#4901)
dscho Apr 12, 2024
7ba58ea
Merge branch 'run-t5601-and-t7406-with-symlinks-on-windows-10'
dscho Jul 12, 2024
6fb6a58
Merge branch 'Fix-i686-build-with-GCC-v14'
dscho Jul 12, 2024
f6f194f
Merge branch 'Fallback-to-AppData-if-XDG-CONFIG-HOME-is-unset'
dscho Jul 12, 2024
d990127
Merge branch 'run-command-be-helpful-when-Git-LFS-fails-on-Windows-7'
dscho Jul 12, 2024
44c50aa
pack-objects: create new name-hash algorithm (#5157)
dscho Sep 24, 2024
f4ba3c3
Add path walk API and its use in 'git pack-objects' (#5171)
derrickstolee Sep 25, 2024
0ac2f22
Add experimental 'git survey' builtin (#5174)
dscho Sep 26, 2024
ddd0b3d
credential-cache: handle ECONNREFUSED gracefully (#5329)
dscho Jan 1, 2025
5632507
mingw_open_existing: handle directories better (#5342)
dscho Jan 23, 2025
5123dd5
Drop support for `core.restrictInheritedHandles`, as it targeted Wind…
dscho Mar 4, 2025
df67db2
git-gui--askyesno: fix funny text wrapping
dscho Sep 20, 2017
7363c2b
git-gui: provide question helper for retry fallback on Windows
hvoigt Feb 21, 2010
fa2cda4
git-gui--askyesno: allow overriding the window title
dscho Sep 20, 2017
4be9421
git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
dscho Jul 23, 2010
b05e566
git-gui--askyesno (mingw): use Git for Windows' icon, if available
dscho Sep 20, 2017
a3f5411
Merge 'git-gui' into HEAD
dscho Jun 7, 2018
06cf70e
Merge branch 'ready-for-upstream'
dscho Oct 11, 2018
0755621
Win32: make FILETIME conversion functions public
kblees Jul 6, 2013
68638b9
Win32: dirent.c: Move opendir down
kblees Sep 8, 2013
a09db7d
mingw: make the dirent implementation pluggable
kblees Sep 8, 2013
88e53ce
Win32: make the lstat implementation pluggable
kblees Sep 8, 2013
56bbe10
mingw: add infrastructure for read-only file system level caches
kblees Sep 8, 2013
071b8b0
mingw: add a cache below mingw's lstat and dirent implementations
kblees Oct 1, 2013
a0b1352
fscache: load directories only once
kblees Jun 24, 2014
3f45f86
fscache: add key for GIT_TRACE_FSCACHE
jeffhostetler Jan 24, 2017
e016a0b
fscache: remember not-found directories
jeffhostetler Dec 13, 2016
a42a6e5
fscache: add a test for the dir-not-found optimization
dscho Jan 25, 2017
afe18dd
add: use preload-index and fscache for performance
jeffhostetler Nov 22, 2016
c87e9e8
Merge branch 'git-gui-askyesno'
dscho Jun 8, 2018
3b09015
dir.c: make add_excludes aware of fscache during status
jeffhostetler Nov 1, 2017
0787452
fscache: make fscache_enabled() public
jeffhostetler Dec 20, 2017
ac9e067
dir.c: regression fix for add_excludes with fscache
jeffhostetler Dec 20, 2017
95a906b
fetch-pack.c: enable fscache for stats under .git/objects
Nov 22, 2017
4ae43da
checkout.c: enable fscache for checkout again
Jan 30, 2018
ce263d4
Enable the filesystem cache (fscache) in refresh_index().
benpeart Sep 7, 2018
c53ce36
fscache: use FindFirstFileExW to avoid retrieving the short name
benpeart Oct 23, 2018
349641e
fscache: add GIT_TEST_FSCACHE support
benpeart Oct 4, 2018
07a0f2e
mem_pool: add GIT_TRACE_MEMPOOL support
benpeart Oct 4, 2018
7b2c47a
fscache: add fscache hit statistics
benpeart Sep 25, 2018
d03d04d
fscache: fscache takes an initial size
benpeart Nov 2, 2018
d5c0eb4
unpack-trees: enable fscache for sparse-checkout
derrickstolee Jun 12, 2019
eb393f9
status: disable and free fscache at the end of the status command
benpeart Nov 1, 2018
6de6c6f
fscache: update fscache to be thread specific instead of global
benpeart Oct 4, 2018
071cd0d
fscache: teach fscache to use mempool
benpeart Nov 2, 2018
13c7c9e
fscache: remember the reparse tag for each entry
dscho Dec 11, 2018
b03c3b4
fscache: make fscache_enable() thread safe
benpeart Nov 16, 2018
c3810de
fscache: implement an FSCache-aware is_mount_point()
dscho Dec 11, 2018
47a4d5a
Merge branch 'fscache'
dscho Nov 15, 2018
70277eb
fscache: teach fscache to use NtQueryDirectoryFile
benpeart Nov 15, 2018
dc52e01
clean: make use of FSCache
dscho Dec 11, 2018
95e2a9e
Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
dscho Nov 5, 2018
5fb40fd
Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
dscho Nov 16, 2018
e7de70f
Merge branch 'dont-clean-junctions-fscache'
dscho Jul 23, 2019
2994178
pack-objects (mingw): demonstrate a segmentation fault with large deltas
vangdfang Jan 9, 2014
c8b6c1d
mingw: support long paths
kblees Jul 28, 2015
a2ae917
Win32: fix 'lstat("dir/")' with long paths
kblees Jul 4, 2014
bb23023
win32(long path support): leave drive-less absolute paths intact
dscho Sep 6, 2023
197de64
compat/fsmonitor/fsm-*-win32: support long paths
jeffhostetler Mar 25, 2022
e00bc5a
strbuf_readlink: don't call readlink twice if hint is the exact link …
kblees May 11, 2015
5fa006e
strbuf_readlink: support link targets that exceed PATH_MAX
kblees May 11, 2015
8eda664
lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
kblees May 11, 2015
818823b
Win32: don't call GetFileAttributes twice in mingw_lstat()
kblees May 12, 2015
d1ad364
Win32: implement stat() with symlink support
kblees May 15, 2015
1ecc275
Win32: remove separate do_lstat() function
kblees May 11, 2015
8811b6d
Win32: let mingw_lstat() error early upon problems with reparse points
kblees May 23, 2015
8e8d76f
mingw: Support `git_terminal_prompt` with more terminals
kblees Mar 19, 2015
db6bdb0
mingw: teach fscache and dirent about symlinks
kblees Jan 10, 2017
c565315
compat/terminal.c: only use the Windows console if bash 'read -r' fails
kblees May 9, 2015
75d0b1e
Win32: lstat(): return adequate stat.st_size for symlinks
kblees May 15, 2015
978fa72
clean: suggest using `core.longPaths` if paths are too long to remove
mathstuf Apr 22, 2022
c2dd4e2
mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
dscho Feb 23, 2018
2e5b30c
Win32: factor out retry logic
kblees May 19, 2015
303962a
Win32: change default of 'core.symlinks' to false
kblees May 23, 2015
0dac521
Win32: add symlink-specific error codes
kblees May 15, 2015
a8e6d38
Win32: mingw_unlink: support symlinks to directories
kblees May 23, 2015
7d7b851
Win32: mingw_rename: support renaming symlinks
kblees May 19, 2015
771b29b
Win32: mingw_chdir: change to symlink-resolved directory
kblees May 23, 2015
3e708df
Win32: implement readlink()
kblees May 23, 2015
0cfb182
mingw: lstat: compute correct size for symlinks
billziss-gh May 28, 2020
2a949ab
Win32: implement basic symlink() functionality (file symlinks only)
kblees May 23, 2015
7f97720
Win32: symlink: add support for symlinks to directories
kblees May 23, 2015
354b1de
mingw: try to create symlinks without elevated permissions
dscho May 30, 2017
863e023
mingw: emulate stat() a little more faithfully
dscho Mar 2, 2020
b42db30
mingw: introduce code to detect whether we're inside a Windows container
ZCube Apr 23, 2018
f3f6cfd
mingw: special-case index entries for symlinks with buggy size
dscho Jun 4, 2020
3b5712f
Win32: symlink: move phantom symlink creation to a separate function
piscisaureus Oct 26, 2018
45c559a
mingw: when running in a Windows container, try to rename() harder
ZCube Apr 23, 2018
1051024
Introduce helper to create symlinks that knows about index_state
dscho Feb 11, 2019
81a88ce
mingw: move the file_attr_to_st_mode() function definition
ZCube Apr 23, 2018
10a1507
mingw: allow to specify the symlink type in .gitattributes
piscisaureus Oct 26, 2018
24f9cec
mingw: Windows Docker volumes are *not* symbolic links
dscho Apr 23, 2018
177b60f
mingw: work around rename() failing on a read-only file
dsl101 Jul 28, 2023
3166868
Win32: symlink: add test for `symlink` attribute
piscisaureus Oct 26, 2018
0d74aa1
mingw: explicitly specify with which cmd to prefix the cmdline
dscho Jul 20, 2017
0a609c2
mingw: when path_lookup() failed, try BusyBox
dscho Jul 20, 2017
158a333
test-lib: avoid unnecessary Perl invocation
dscho Aug 5, 2017
cfe9431
test-tool: learn to act as a drop-in replacement for `iconv`
dscho Jul 20, 2017
a03d63f
tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
dscho Jul 20, 2017
bf1d189
gitattributes: mark .png files as binary
dscho Oct 11, 2018
41dacb8
tests: move test PNGs into t/lib-diff/
dscho Aug 5, 2017
6fa7afa
tests: only override sort & find if there are usable ones in /usr/bin/
dscho Jul 17, 2017
40d4e2b
tests: use the correct path separator with BusyBox
dscho Nov 19, 2018
76db262
mingw: only use Bash-ism `builtin pwd -W` when available
dscho Jun 29, 2017
2605cd8
tests (mingw): remove Bash-specific pwd option
dscho Jun 30, 2017
d936053
test-lib: add BUSYBOX prerequisite
dscho Jul 19, 2017
b66cfb1
t5003: use binary file from t/lib-diff/
dscho Aug 5, 2017
96966a1
t5532: workaround for BusyBox on Windows
dscho Jul 21, 2017
92b3ea6
t5605: special-case hardlink test for BusyBox-w32
dscho Jul 21, 2017
ad7b67b
t5813: allow for $PWD to be a Windows path
dscho Jul 5, 2017
73b311d
t9200: skip tests when $PWD contains a colon
dscho Jul 7, 2017
3761c2d
mingw: kill child processes in a gentler way
dscho May 17, 2017
56f2019
mingw: add a Makefile target to copy test artifacts
dscho Jul 19, 2017
112624d
mingw: optionally enable wsl compability file mode bits
swigger Jun 7, 2023
edc7961
Add a GitHub workflow to monitor component updates
dscho Sep 29, 2020
b7b5f50
mingw: really handle SIGINT
dscho Apr 22, 2018
1be24cc
mingw: do not call xutftowcs_path in mingw_mktemp
neerajsi-msft Oct 27, 2021
482bb59
Partially un-revert "editor: save and reset terminal after calling ED…
dscho Nov 25, 2021
47d6871
reset: reinstate support for the deprecated --stdin option
dscho Dec 10, 2019
11128ac
fsmonitor: reintroduce core.useBuiltinFSMonitor
vdye Apr 4, 2022
05bf987
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
d27a317
Describe Git for Windows' architecture [no ci]
dscho Feb 13, 2023
157d7fa
Modify the Code of Conduct for Git for Windows
dscho Oct 11, 2019
a828efd
CONTRIBUTING.md: add guide for first-time contributors
derrickstolee Mar 1, 2018
e4d3adf
README.md: Add a Windows-specific preamble
dscho Jan 10, 2014
9f4ea73
Add an issue template
shiftkey Feb 18, 2016
56057db
Merge branch 'gitk-and-git-gui-patches'
dscho Oct 11, 2018
d56c12f
Modify the GitHub Pull Request template (to reflect Git for Windows)
Dec 22, 2017
98a4219
Merge branch 'long-paths'
dscho Nov 15, 2018
4341a3f
SECURITY.md: document Git for Windows' policies
dscho Aug 23, 2019
152b4ab
Merge branch 'msys2'
dscho Nov 15, 2018
a585737
Merge branch 'kblees/kb/symlinks'
dscho Nov 15, 2018
a2b5b73
Merge 'docker-volumes-are-no-symlinks'
dscho Oct 12, 2018
0082dec
mingw: try resetting the read-only bit if rename fails (#4527)
dscho Aug 7, 2023
84f0bdc
Merge pull request #1897 from piscisaureus/symlink-attr
dscho Oct 31, 2018
d024de6
Merge branch 'busybox-w32'
dscho Feb 7, 2019
e002456
Merge branch 'wsl-file-mode-bits'
dscho Aug 7, 2023
a3b9c50
Merge pull request #1170 from dscho/mingw-kill-process
dscho Oct 11, 2018
580b814
Merge pull request #3492 from dscho/ns/batched-fsync
vdye Oct 28, 2021
df46155
Merge branch 'un-revert-editor-save-and-reset'
dscho Jan 15, 2022
87de84b
Merge branch 'phase-out-reset-stdin'
dscho Jun 8, 2018
f282da5
Merge branch 'deprecate-core.useBuiltinFSMonitor'
dscho Jan 24, 2023
15fba4c
Merge pull request #2837 from dscho/monitor-component-updates
dscho Oct 7, 2020
cca1f38
Merge 'readme' into HEAD
dscho Jun 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions git-gui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ install: all
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
$(QUIET)$(INSTALL_X0)git-gui $(INSTALL_X1) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(QUIET)$(INSTALL_X0)git-gui--askpass $(INSTALL_X1) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(QUIET)$(INSTALL_X0)git-gui--askyesno $(INSTALL_X1) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(QUIET)$(foreach p,$(GITGUI_BUILT_INS), $(INSTALL_L0)'$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' $(INSTALL_L1)'$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' $(INSTALL_L2)'$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' $(INSTALL_L3) &&) true
ifdef GITGUI_WINDOWS_WRAPPER
$(QUIET)$(INSTALL_R0)git-gui.tcl $(INSTALL_R1) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
Expand All @@ -299,6 +300,7 @@ uninstall:
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(gitexecdir_SQ)'/git-gui $(REMOVE_F1)
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(gitexecdir_SQ)'/git-gui--askpass $(REMOVE_F1)
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(gitexecdir_SQ)'/git-gui--askyesno $(REMOVE_F1)
$(QUIET)$(foreach p,$(GITGUI_BUILT_INS), $(REMOVE_F0)'$(DESTDIR_SQ)$(gitexecdir_SQ)'/$p $(REMOVE_F1) &&) true
ifdef GITGUI_WINDOWS_WRAPPER
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(gitexecdir_SQ)'/git-gui.tcl $(REMOVE_F1)
Expand Down
68 changes: 68 additions & 0 deletions git-gui/git-gui--askyesno
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/sh
# Tcl ignores the next line -*- tcl -*- \
exec wish "$0" -- "$@"

# This is an implementation of a simple yes no dialog
# which is injected into the git commandline by git gui
# in case a yesno question needs to be answered.

set NS {}
set use_ttk [package vsatisfies [package provide Tk] 8.5]
if {$use_ttk} {
set NS ttk
}

set title "Question?"
if {$argc < 1} {
puts stderr "Usage: $argv0 <question>"
exit 1
} else {
if {$argc > 2 && [lindex $argv 0] == "--title"} {
set title [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
set prompt [join $argv " "]
}

${NS}::frame .t
${NS}::label .t.m -text $prompt -justify center -width 400px
.t.m configure -wraplength 400px
pack .t.m -side top -fill x -padx 20 -pady 20 -expand 1
pack .t -side top -fill x -ipadx 20 -ipady 20 -expand 1

${NS}::frame .b
${NS}::frame .b.left -width 200
${NS}::button .b.yes -text Yes -command yes
${NS}::button .b.no -text No -command no


pack .b.left -side left -expand 1 -fill x
pack .b.yes -side left -expand 1
pack .b.no -side right -expand 1 -ipadx 5
pack .b -side bottom -fill x -ipadx 20 -ipady 15

bind . <Key-Return> {exit 0}
bind . <Key-Escape> {exit 1}

proc no {} {
exit 1
}

proc yes {} {
exit 0
}

if {$::tcl_platform(platform) eq {windows}} {
set icopath [file dirname [file normalize $argv0]]
if {[file tail $icopath] eq {git-core}} {
set icopath [file dirname $icopath]
}
set icopath [file dirname $icopath]
set icopath [file join $icopath share git git-for-windows.ico]
if {[file exists $icopath]} {
wm iconbitmap . -default $icopath
}
}

wm title . $title
tk::PlaceWindow .
6 changes: 6 additions & 0 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,12 @@ set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
if {![info exists env(SSH_ASKPASS)]} {
set env(SSH_ASKPASS) [gitexec git-gui--askpass]
}
if {![info exists env(GIT_ASKPASS)]} {
set env(GIT_ASKPASS) [gitexec git-gui--askpass]
}
if {![info exists env(GIT_ASK_YESNO)]} {
set env(GIT_ASK_YESNO) [gitexec git-gui--askyesno]
}

######################################################################
##
Expand Down