Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for duet-rebase and duet-cherry-pick and git stash #24

Open
thewoolleyman opened this issue Nov 11, 2015 · 16 comments
Open

Comments

@thewoolleyman
Copy link

Hi,

I use a rebase workflow for feature branches. Are you open to adding a duet-rebase command? If so I can try to submit a pull request if you don't get to it.

Thanks,
-- Chad

@jszwedko
Copy link
Member

@thewoolleyman definitely open to a pull request!

@thewoolleyman
Copy link
Author

@jszwedko Hi - I'm hacking on this today and having some troubles getting my env/tests green before I start. Would you be available to answer a couple of questions? I've got bats and getdb.io installed (I think correctly) but still have about half of the tests in the suite failing...

(update: and go install ./... fails on the "internal" dependencies)

@thewoolleyman thewoolleyman changed the title Add support for duet-rebase Add support for duet-rebase and duet-cherry-pick Nov 20, 2015
@jszwedko
Copy link
Member

@thewoolleyman interesting, could you share the failing tests and their outputs? I'm on Freenode as _jesse_ if you think it'd be useful to communicate in real time.

I appreciate you contributing!

@thewoolleyman
Copy link
Author

@jszwedko Sure - it would probably be easiest to talk through real time. What's a good time to discuss on freenode?

@jszwedko
Copy link
Member

@thewoolleyman awesome, I should be online most of today (PST hours) or tomorrow during 9AM - 5PM PST.

@thewoolleyman
Copy link
Author

OK, Pinged you on freenode. Here's a gist with info on where I am including details of my env and failing tests: https://gist.github.com/thewoolleyman/4fdf9529e8fef5bbbf5a - I'm still in private chat on freenode to discuss further.

@thewoolleyman
Copy link
Author

OK, after brew uninstall git-duet and manually adding absolute path to project bin (after gb build) the tests passed. Thought I had tried this before, but I guess not :)

I updated the gist for completeness, and I'll look at adding tests after we resolve exactly how you want git-duet-rebase implemented (per discussion on the pull request: #25 (comment) )

@thewoolleyman thewoolleyman changed the title Add support for duet-rebase and duet-cherry-pick Add support for duet-rebase and duet-cherry-pick and git stash Nov 24, 2015
@thewoolleyman
Copy link
Author

@jszwedko I also remembered git stash was the other one that always fails. Any reason not to also add an executable wrapper for this too?

@krishicks
Copy link

The way I've been handling this is to use git rebase -i --exec "git duet-commit --amend --reset-author". It's a bit annoying because you still need to remove the extra signoff line in each commit, but at least it fixes the author/committership.

@jszwedko
Copy link
Member

jszwedko commented Feb 6, 2016

That is a good one line work around, thank you @krishicks -- I'll add that to the README until we have a better way to handle this (it is annoying that the signoff line will be inaccurate at that point).

jszwedko added a commit that referenced this issue Feb 6, 2016
Hopefully we can come up with a better solution in the future. Related
to issue #24
@jszwedko
Copy link
Member

jszwedko commented Feb 6, 2016

Added workaround to the README in bebab41

Hopefully we can come up with something better for the long term.

@krishicks
Copy link

Cool. You might want to specify in the README that you still need to update the signoff by deleting all but the last entry.

For what it's worth, the git hooks samples have one that adds Signed-off-by (prepare-commit-msg.sample), which includes this:

# The third example adds a Signed-off-by line to the message, that can
# still be edited.  This is rarely a good idea.

I think it's that way for this very reason of adding multiple Signed-off-by entries.

@carpeliam
Copy link

@krishicks
Copy link

Seems a bit much. filter-branch is the nuclear option.

@jszwedko
Copy link
Member

filter-branch is very powerful, but seems reasonable for this use case. I'll leave the interactive rebase as the preferred option (since you are less likely to do any foot shooting), but I'll add this as an additional option. Thanks for sharing!

@jszwedko
Copy link
Member

Added script and link in cea5358

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

No branches or pull requests

4 participants