Commit Graph

27 Commits

Author SHA1 Message Date
Dax T. Games
ce02fb4a0e fix find latest git 2022-04-16 10:51:26 -04:00
dgames
357e51acd1 spelling fixes 2022-01-15 11:00:58 -05:00
Dax T Games
9088a5e2e6
Merge pull request #2430 from qfp64/faster-init
Improve init speed
2020-12-11 05:48:07 -05:00
Kyle McInnes
11a78a8d64 Fix errors 2020-12-10 13:35:40 +00:00
Kyle McInnes
2a9a4d2860 Speed up calls to lib_console 2020-12-07 19:41:11 +00:00
Dax T. Games
467b4d4ad9 hide possible file write conflict 2020-09-13 08:27:10 -04:00
Dax T. Games
ea6e18c834 hide possible file write confilct 2020-09-13 08:02:46 -04:00
Dax T. Games
d1adf16fa8 'fixes' 2020-08-24 20:27:56 -04:00
Dax T. Games
cda883bc39 add setlocal 2020-08-23 08:47:20 -04:00
Dax T. Games
b1ef763922 add setlocal 2020-08-23 08:42:58 -04:00
Florian Schwalm
167c49ee6d Rewrite old calls to :verbose_output to working %lib_console% verbose_output 2020-07-29 22:46:35 +02:00
Florian Schwalm
0ed10e5e89 Reorder if-else-clauses in :compare_git_versions so last else block can be reached
It is hard to spot without the brackets, but the last else block - that resets %test_dir% and
logs in verbose mode that an older user git version will be ignored - can't actually be reached.
The else block is considered to belong to the if clause "if exist "%test_dir:~0,-4%\cmd\git.exe""
that will only ever be executed if ERRORLEVEL is greather than or equal to 0, thus if the test fails,
the following else if clause "else if ERRORLEVEL 0" will always succeed and the last else block will be ignored.
Using the vendored git version may still have worked because %GIT_INSTALL_ROOT% isn't set either way,
but to enable the log message I reordered if-else-clauses and brackets in the way I think the
original author intended them to work.
2020-07-29 22:39:46 +02:00
Florian Schwalm
cd50db3a7f Use ERRORLEVEL instead of %errorlevel% to compare git versions
%errorlevel% was always 0, even if the vendored git version was more current than the installed one
Usually exiting a batch script with "exit /b exitCode" as used in :compare_versions
sets %errorlevel% to the specified exit code
However, this may not work if %errorlevel% was set before with "Set errorlevel="
I didn't find the location where this might have happened,
but I saw the consequence of %errorlevel% always being 0
Thus I decided to use ERRORLEVEL instead as this will always work regardless of environment variable

For more information check https://ss64.com/nt/errorlevel.html
2020-07-29 22:25:49 +02:00
Dax T. Games
1af12666e4 move git functions to git lib 2020-04-06 08:46:46 -04:00
Dax T. Games
93f8718489 move git functions to git lib 2020-04-06 08:20:26 -04:00
Dax T. Games
468dba474e fixes 2019-10-13 15:47:25 -04:00
Dax T. Games
db42252ef2 cleanup 2019-10-13 10:18:04 -04:00
Dax T. Games
377d97e56a fix path with ! in dir 2019-10-13 10:07:23 -04:00
Dax T. Games
192c2f4dd1 fix git detection 2019-03-31 09:47:50 -04:00
Dax T Games
a5bdecca77 Add /f for fast init. (#1942)
The below enables Cmder Fast Init mode for `cmd.exe` sessions.  This is more like the Cmder 1.3.5 init process.  See issue #1821 

Cmder Fast Init mode bypasses or disables the following Cmder 1.3.6+ features:

* Git root and version detection.  Defaults to `%cmder_root%\vendor\git-for-windows` if it exists.
* Path enhance validation before path modify so `%Path%` enhancements are forced.
* Recursive path add for `"%CMDER_ROOT%\bin"`
* Recursive path add for `"%CMDER_USER_BIN%\bin"` if `/c [user_config_folder` is specified.
* `/d` switch to enable debug output.
* `/v` switch to enable debug output.

Add `/f` to Cmder task as shown below t enable fast init:

_Note 1: This setting is invalid in Cmder `Powershell` and `Bash` sessions~_

_Note 2: Add `/t` also to see init timer output_

![image](https://user-images.githubusercontent.com/7318053/47957637-052e3880-df90-11e8-93ef-91e1ab696d82.png)

Cuts ~2.4 seconds off of init time.

![image](https://user-images.githubusercontent.com/7318053/47957795-45db8100-df93-11e8-8ae0-551d12c4e2dc.png)
2018-11-04 01:36:51 +01:00
Dax T. Games
1d36ba4ed4 fix user lua and git detection 2018-09-16 10:18:10 -05:00
Dax T. Games
541fc16daf Trying to get tcc working 2018-09-01 22:08:00 -05:00
Dax T Games
4df1d744d3 Fix lib base (#1794)
* Fix GIT_INSTALL_ROOT again

* fixed lib_base error

* fix lib help

* fix lib help
2018-05-31 14:35:02 +02:00
Dax T. Games
2a18ba084c fix spelling 2018-04-12 21:43:31 -04:00
Dax T. Games
b8890ed297 switch to debug output 2018-04-12 21:39:52 -04:00
Dax T. Games
063f30c193 fix git missing error on cmder mini cmd shell 2018-04-12 21:32:38 -04:00
Dax T Games
471369f73b Made all sub-routines in init.bat importable libs (#1706) 2018-03-23 15:20:07 +01:00