Create a reflog entry in the same situations that git.exe would. #389

Closed
Haacked opened this Issue Apr 8, 2013 · 7 comments

Projects

None yet

3 participants

@Haacked
Contributor
Haacked commented Apr 8, 2013

I'm not exactly sure all the situations that git.exe creates a reflog entry. I do know of two cases we don't have implemented yet.

The following checklist are all the areas I can think of. Commit is already implemented in another branch so I checked it already.

  • Commit (see #388)
  • Checkout branch
  • Merge
  • Revert?
  • Reset?
  • Fetch
  • Pull
  • ???
@nulltoken
Member

Some notable patterns

Reset:

git reflog | grep reset

68b1e55 HEAD@{709}: reset: moving to HEAD@{3}
7d7354d HEAD@{715}: reset: moving to 7d7354da961fca4aa3e2672c3827661c06cfcb41

Checkout:

git reflog | grep checkout

64d336b HEAD@{153}: checkout: moving from vNext to 64d336b
92899d5 HEAD@{166}: checkout: moving from s to vNext
a2a1404 HEAD@{167}: checkout: moving from vNext to s
92899d5 HEAD@{180}: checkout: moving from 4108cd2e26cd2f3576e7a9121ca836b7aac92b8a to 92899d52a72c7f6db153707f7ea4e2a532c67c38^0
4108cd2 HEAD@{181}: checkout: moving from vNext to yorah/topic/unmatched-pathspecs
7f723ca HEAD@{183}: checkout: moving from f3b68a76ec085d412cc4772e9721226b946fabb2 to vNext
@nulltoken
Member
  • Checkout now honors the reflog
  • Refs.Add() and Refs.UpdateTarget() accept an optional message to fill the reflog with
@nulltoken
Member

@Saaman You did a wonderful job on these! ❤️

Would you have some time to make Reset(), Clone(), Push() and Fetch() feed the reflog as well?

@Saaman
Contributor
Saaman commented May 4, 2013

Yes, I intend to implement it as well, certainly during the next few weeks.
I'll notify this thread about the progress of it!

@nulltoken
Member

Yeah! @Saaman totally nailed Reset()

@nulltoken
Member

#612 should now make reflog fed for any kind of reference updation

@nulltoken nulltoken closed this Mar 20, 2014
@nulltoken nulltoken added this to the v0.17.0 milestone Mar 20, 2014
@Haacked
Contributor
Haacked commented Mar 20, 2014

Woohoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment