My summer with Google Summer of Code - 2018, Git organization.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
blog
patches
proposal
README.md

README.md

Google Summer of Code 2018 with Git

Proposal

You can check out my proposal at this link.

Blogs posts:

Additional:

Patches

git stash

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").

V7:

Link to every patch (mailing list)

* 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

V6:

GitHub tag

Link to every patch (mailing list):

First series of patches:

Second series of patches:

Third series of patches:

GET_OID_GENTLY

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.

GitHub pull request

GitHub tag

Mailing list

Link to every patch (mailing list)

Status: not merged

TODO:

  • 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 like git stash pop and git 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.

Results

Running time on:

Linux (Ubuntu 17.10)

  • 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
    

Windows 8.1:

  • 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