ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
714 stars 65 forks source link

Linux x86-64 tarball, commits not being tagged #409

Open chriscz opened 1 month ago

chriscz commented 1 month ago

Been trying to give git-spr (version 0.14.9) another go, but for some reason when I commit my commits aren't being tagged with commit-id. Git version is 2.40.1.

I'm not using verbose commit messages either.

I see some references to spr_commit_hook on previous issues, but it seems to have been removed or replaced with another mechanism and is not included in the spr_linux_x86_64.tar.gz tarball. I see these files

LICENSE
git-amend
git-spr
readme.md
spr_reword_helper

Details

Gitconfig

Maybe gpgSign is causing this?

[init]
    defaultBranch = main

[core]
    excludesfile = ~/.gitignore_global

[submodule]
    recurse = true

[fetch]
    recurseSubmodules = on-demand 

[push]
    default = simple

[pull]
    rebase = true

[rebase]
    instructionFormat = "%s (%aN)"
    abbreviateCommands = true
    autoSquash = true # Automatically handle commits starting with `fixup!` `squash!` and `amend!` within interactive rebases

[rerere]
    enabled = true

[diff "enc"]
    textconv = rails encrypted:show
    cachetextconv = false

[commit]
    gpgSign = true

[tag]
    forceSignAnnotated = true

[merge]
    tool = meld
    conflictstyle = diff3

Is spr supposed to automatically install this hook?

ejoffe commented 1 month ago

@chriscz : You are right that spr used to use a commit hook to add the commit-id. This mechanism changed to longer need a commit hook, instead appending the commit-id to the commit is done in the tool itself whenever you run spr update. spr_reword_helper is used to do the actual rewrite by setting a special editor in a rebase. This happens in the GetLocalCommitStack method.