Skip to content

Make stash a builtin - #191

Closed
rimrul wants to merge 2 commits into
git:masterfrom
rimrul:upstream-stash-builtin
Closed

Make stash a builtin#191
rimrul wants to merge 2 commits into
git:masterfrom
rimrul:upstream-stash-builtin

Conversation

@rimrul

@rimrul rimrul commented Jan 21, 2016

Copy link
Copy Markdown
Contributor

These are the first two Patches in an upcomming series of Patches to
convert git stash into a builtin command. This is mainly based on the
general performance of scripts running inside an interpreter (bash in
this case) running inside a POSIX emulation layer on Windows. Shell,
perl and python scripts are generaly a lot faster on Unix-like systems
compared to Windows systems. That does not mean that Unix-like systems
won't benefit from more native Git commands, but the effect is bigger
on Git for Windows.

These two patches port over the core non-patch part of git-stash into
native code using a separate helper command. This helper command is
intended as a temporary meassure and as such it's subject to change.
For this reason, I did not implement new regression tests, documentation
or localizations for this command.

I meassured the changes in excecution time for the stash related
regression tests on the same hardware running Windows 8.1 and
Kubuntu 15.10. Each result is the difference between the average of five
meassurements (six on Linux, because I lost count on the first run of
meassurements) each before and after these changes. I meassured the
following changes:

Windows:

t3903
real -5,10%
user -0,94%
sys +0,16% (10ms)

t3904
real -0,30%
user -2,98% (20ms)
sys +5,03%

t3905
real -4,03%
user -8,13%
sys +17,42%

t3906
real -2,57%
user +1,94%
sys +1,59%

Linux:

t3903
real +0,63%
user +10,87% (3ms)
sys +4,29% (4ms)

t3904
real -7,29%
user -30,61%
sys +5,77% (4ms)

t3905
real -7,29%
user -33,33% (2ms)
sys +20% (2ms)

t3906
real -0,88%
user -1,08% (1ms)
sys -2,22%

I added the asolute times where I think the difference is below the
meassurement precission (4ms on Linux) and on the two lowest absolute
differences on windows. A full log of all meassurement runs is available
at https://gist.github.com/rimrul/82adf3b368ed633263d2. Please note that
according to Johannes Schindelin, maintainer of Git for Windows, the
meassuring of sys time on Windows is unreliable. With that in mind,
in summary this is a slight increase in performance on Linux, and a more
noticeable increase on Windows.

@rimrul
rimrul force-pushed the upstream-stash-builtin branch 2 times, most recently from d1893d9 to 0027f17 Compare January 27, 2016 13:06
peff referenced this pull request Jan 27, 2016
The tests are currently executed on "Ubuntu 12.04 LTS Server Edition
64 bit" and on "OS X Mavericks" using gcc and clang.

Perforce and Git-LFS are installed and therefore available for the
respective tests.

Signed-off-by: Lars Schneider <[email protected]>
Signed-off-by: Jeff King <[email protected]>
@submitgit

Copy link
Copy Markdown
Member

@rimrul sent these 2 commits (d10e2cb...0027f17) as a set of patches to the mailing list with submitGit - here on Gmane, MARC

@submitgit

Copy link
Copy Markdown
Member

@rimrul sent these 2 commits (d10e2cb...0027f17) as a set of patches to the mailing list with submitGit - here on Gmane, MARC

@submitgit

Copy link
Copy Markdown
Member

@rimrul sent these 2 commits (d10e2cb...0027f17) as a set of patches to the mailing list with submitGit - here on Gmane, MARC

@rimrul

rimrul commented Jan 28, 2016

Copy link
Copy Markdown
Contributor Author

The pull request has reached the mailing list after some trouble related to rtyley/submitgit#23.

rimrul added 2 commits April 2, 2016 15:09
This patch implements a new "git stash--helper" builtin plumbing
command that will be used to migrate "git-stash.sh" to C.

We start by implementing only the "--non-patch" option that will
handle the core part of the non-patch stashing.

Signed-off-by: Matthias Aßhauer <[email protected]>
Use the new "git stash--helper" builtin. It should be faster than the old shell code and is a first step to move
more shell code to C.

Signed-off-by: Matthias Aßhauer <[email protected]>
@rimrul
rimrul force-pushed the upstream-stash-builtin branch 2 times, most recently from e104501 to b527dfb Compare April 2, 2016 17:24
carlosmn pushed a commit to carlosmn/git that referenced this pull request Oct 26, 2016
git-daemon: accept config options from the remote
@dscho

dscho commented Jun 4, 2019

Copy link
Copy Markdown
Member

I guess this can be closed, now that a built-in stash is on its way to v2.22.0?

@rimrul

rimrul commented Jun 4, 2019

Copy link
Copy Markdown
Contributor Author

Yes, I agree

@rimrul rimrul closed this Jun 4, 2019
@rimrul

rimrul commented Jun 4, 2019

Copy link
Copy Markdown
Contributor Author

Oh, yes, I should've closed this back in April 2018 along with git-for-windows#508

@dscho

dscho commented Jun 4, 2019

Copy link
Copy Markdown
Member

:-)

derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Oct 4, 2019
gvfs-helper: create tool to fetch objects using the GVFS Protocol
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Jun 2, 2020
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 3, 2020
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Nov 3, 2020
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Dec 23, 2020
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit to derrickstolee/git that referenced this pull request Dec 24, 2020
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Dec 29, 2020
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Mar 19, 2021
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 10, 2021
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 15, 2021
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 17, 2021
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Nov 2, 2021
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Mar 16, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request May 22, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Jun 23, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Jun 27, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Jul 14, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Sep 30, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Oct 4, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Nov 8, 2022
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Mar 15, 2023
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Mar 15, 2023
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request May 11, 2023
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 23, 2023
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
vdye pushed a commit to vdye/git that referenced this pull request Jan 9, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
vdye pushed a commit to vdye/git that referenced this pull request Jan 9, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
vdye pushed a commit to vdye/git that referenced this pull request Jan 9, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
vdye pushed a commit to vdye/git that referenced this pull request Jan 9, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
vdye pushed a commit to vdye/git that referenced this pull request Jan 9, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Apr 30, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request May 31, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Jun 19, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Jul 19, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 23, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Sep 30, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Oct 9, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit to derrickstolee/git that referenced this pull request Dec 10, 2024
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Aug 5, 2025
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Sep 2, 2025
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Nov 7, 2025
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Feb 3, 2026
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit to derrickstolee/git that referenced this pull request Apr 22, 2026
Includes commits from these pull requests:

	git#191
	git#205
	git#206
	git#207
	git#208
	git#215
	git#220
	git#221

Signed-off-by: Derrick Stolee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants