You can check out my proposal at this link.
- Week 1 (introduction)
- Week 2
- Week 3
- Week 4
- Week 5
- Week 6
- Week 7
- Week 8
- Week 9
- Week 10
- Week 10 (update)
- Week 11
- Week 12
- Week 13
- Week 14
Additional:
This is what I have been working on during this summer. It is a series consisting of 26 patches. At the moment, they are on the mailing list, waiting to get reviewed. A part of them were already reviewed (up to and including "stash: convert store to builtin").
Link to every patch (mailing list)
- 01/26: sha1-name.c: added 'get_oidf', which acts like 'get_oid'
- 02/26: stash: improve option parsing test coverage *
- 03/26: stash: update test cases conform to coding guidelines
- 04/26: stash: renamed test cases to be more descriptive
- 05/26: stash: convert apply to builtin *
- 06/26: stash: convert drop and clear *
- 07/26: stash: convert branch *
- 08/26: stash: convert pop *
- 09/26: stash: implement the "list" command in the builtin
- 10/26: stash: convert show to builtin
- 11/26: stash: change
git stash show
usage text and documentation - 12/26: stash: refactor
show_stash()
to use the diff API - 13/26: stash: update
git stash show
documentation - 14/26: stash: convert store to builtin
- 15/26: stash: convert create
- 16/26: stash: replace spawning a "read-tree" process
- 17/26: stash: avoid spawning a "diff-index" process
- 18/26: stash: convert push to builtin
- 19/26: stash: make push to be quiet
- 20/26: stash: add tests for
git stash push -q
- 21/26: stash: replace spawning
git ls-files
child process - 22/26: stash: convert save to builtin
- 23/26: stash: convert
stash--helper.c
intostash.c
- 24/26: stash: optimize
get_untracked_files()
andcheck_changes()
- 25/26: stash: replace all
write-tree
child processes with API calls - 26/26: stash: replace all "git apply"
* The project was originally started by Joel Teichroeb. During the bonding period, he agreed to give me custody of his patches (the ones marked with *). I independently modified the original patches and developed new ones.
Status: waiting to get reviewed
Link to every patch (mailing list):
First series of patches:
- 1/4: sha1-name.c: added 'get_oidf', which acts like 'get_oid'
- 2/4: stash: improve option parsing test coverage
- 3/4: stash: update test cases conform to coding guidelines
- 4/4: stash: renamed test cases to be more descriptive
Second series of patches:
- 1/4: stash: convert apply to builtin
- 2/4: stash: convert drop and clear
- 3/4: stash: convert branch
- 4/4: stash: convert pop
Third series of patches:
- 1/6: stash: implement the "list" command in the builtin
- 2/6: stash: convert show to builtin
- 3/6: stash: change
git stash show
usage text and documentation - 4/6: stash: refactor
show_stash()
to use the diff API - 5/6: stash: update
git stash show
documentation - 6/6: stash: convert store to builtin
When I started working on git stash
, I did not forsee that get_oid()
might die in case there is an empty reflog. The purpose of this patch is to replace spawning git rev-parse --verify --quiet
.
Link to every patch (mailing list)
- 1/6: sha1-name: Add
GET_OID_GENTLY
flag - 2/6: tree-walk: Add three new gentle helpers
- 3/6: refs.c: Teach
read_ref_at()
to acceptGET_OID_GENTLY
flag - 4/6: sha1-name: Teach
get_oid_basic()
to be gentle - 5/6: sha1-name: Teach
get_oid_with_context[_1]()
- 6/6: sha1-name: Add gentle alternative for
get_oid()
Status: not merged
-
One thing which was not included in the schedule, but might be a welcomed feature, is to introduce a new subcommand:
git stash commit
which would act likegit stash pop
andgit commit
. -
Add the possibility to see untracked files in a stash. There has been a discussion about this on the mailing list.
-
Running
git stash show -p
and trying to split a hunk does not work properly in all the cases. There has been a discussion about this on the mailing list
Initial file:
Text1.
Text2.
Text3.
Text4.
Text5.
Case 1:
Text1.foo
Text2.
Text3.
Text4.bar
Text5.
Case 2:
Text1.foo
Text2.
Text3.
Text4.
Text5.bar
Running git stash push -p
, splitting the hunk, accepting one and refusing the other one:
-
in the first case an error messaged is falsely (to some degree) displayed. The stash was created, but the changes were not removed from the index.
-
in the second case everything works fine.
So, the problem occurs only when there are 2 or less lines between the edited lines.
Running time on:
- git test suite (t3903-stash.sh, t3904-stash-patch.sh, t3905-stash-include-untracked.sh and t3906-stash-submodule.sh)
t3903-stash.sh:
** SHELL: 12,69s user 9,95s system 109% cpu 20,730 total
** C: 2,67s user 2,84s system 105% cpu 5,206 total
t3904-stash-patch.sh:
** SHELL: 1,43s user 0,94s system 106% cpu 2,242 total
** C: 1,01s user 0,58s system 104% cpu 1,530 total
t3905-stash-include-untracked.sh
** SHELL: 2,22s user 1,73s system 110% cpu 3,569 total
** C: 0,59s user 0,57s system 106% cpu 1,085 total
t3906-stash-submodule.sh
** SHELL: 2,89s user 2,99s system 106% cpu 5,527 total
** C: 2,21s user 2,61s system 105% cpu 4,568 total
TOTAL:
** SHELL: 19.23s user 15.61s system
** C: 6.48s user 6.60s system
-
a git repository with 4000 files: 1000 not changed, 1000 staged files, 1000 unstaged files, 1000 untracked. In this case I ran some of the most used commands:
git stash push: ** SHELL: 0,12s user 0,21s system 101% cpu 0,329 total ** C: 0,06s user 0,13s system 105% cpu 0,185 total git stash push -u: ** SHELL: 0,18s user 0,27s system 108% cpu 0,401 total ** C: 0,09s user 0,19s system 103% cpu 0,267 total git stash pop: ** SHELL: 0,16s user 0,26s system 103% cpu 0,399 total ** C: 0,13s user 0,19s system 102% cpu 0,308 total
- git test suite (t3903-stash.sh, t3904-stash-patch.sh, t3905-stash-include-untracked.sh and t3906-stash-submodule.sh)
TOTAL:
** SHELL: 17m20.407s
** C: 5m 6.967s
=================================
t3903-stash.sh:
** SHELL:
real 11m28.043s
user 0m11.042s
sys 0m24.278s
** C:
real 1m56.922s
user 0m11.725s
sys 0m25.462s
================================
t3904-stash-patch.sh:
** SHELL:
real 0m35.436s
user 0m1.117s
sys 0m2.669s
** C:
real 0m32.015s
user 0m2.346s
sys 0m5.151s
================================
t3905-stash-include-untracked.sh
** SHELL:
real 2m11.608s
user 0m2.482s
sys 0m4.737s
** C:
real 0m24.749s
user 0m2.171s
sys 0m5.060s
=================================
t3906-stash-submodule.sh
** SHELL:
real 3m5.032s
user 0m7.563s
sys 0m21.697s
** C:
real 2m13.281s
user 0m8.644s
sys 0m20.799s