benthayer / git-gud

Wanna git gud? Then get git-gud, and git gud at git!
MIT License
411 stars 43 forks source link

Store merge hashes #41

Closed benthayer closed 4 years ago

benthayer commented 4 years ago

Once we complete #40, we'll want to also keep track of the hashes of the merges. We'll also want to give them names like "M1", "M2", etc. as defined in #38. We can do this using the post-merge hook. See #40 for the details of the .json file.

38 is similar, but these two issues can be completed in any order.

This resource will be helpful: https://git-scm.com/docs/githooks

benthayer commented 4 years ago

I'm not sure when this will be useful, so I'm going to close

parkmichael777 commented 4 years ago

So I'm trying to understand how post-rewrite works so that I can do something similar for post-merge. So far, I understand that you have an array for all the hooks and when gitgud initalizes, it creates the post-rewrite hook and tells it to execute your python script. However, when I do git gud reset, and look for this hook_file (in my testing directory), I can't find it. Also, when I use git rebase, the stuff in your post-rewrite.py script doesn't print; instead, I see this: "First, rewinding head to replay your work on top of it... Applying:" Which I can't track down the location of (nothing shows up on grep).

benthayer commented 4 years ago

Delete the folder you're testing in and re-initialize. Look in main's handle_init for details of how it's set up

On Fri, Dec 20, 2019, 3:47 PM parkmichael777 notifications@github.com wrote:

So I'm trying to understand how post-rewrite works so that I can do something similar for post-merge. So far, I understand that you have an array for all the hooks and when gitgud initalizes, it creates the post-rewrite hook and tells it to execute your python script. However, when I do git gud reset, and look for this hook_file (in my testing directory), I can't find it. Also, when I use git rebase, the stuff in your post-rewrite.py script doesn't print; instead, I see this: "First, rewinding head to replay your work on top of it... Applying:" Which I can't track down the location of (nothing shows up on grep).

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/benthayer/git-gud/issues/41?email_source=notifications&email_token=ABORCYYEYJ6TMTERVNUEJYTQZU4OHA5CNFSM4JCOE3GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHOIH6A#issuecomment-568099832, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABORCY7BYFA23EOEJ6LCQHDQZU4OHANCNFSM4JCOE3GA .