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

Improve suggestion on what to do if --signoff is missing #6

Closed
Mo-Gul opened this issue Dec 5, 2021 · 5 comments
Closed

Improve suggestion on what to do if --signoff is missing #6

Mo-Gul opened this issue Dec 5, 2021 · 5 comments

Comments

@Mo-Gul
Copy link

Mo-Gul commented Dec 5, 2021

Currently the user "only" receives

dco/libs/helper.js

Lines 9 to 12 in f2279e6

What should I do to fix it ?
All proposed commits should include a Signed-off-by: <your-name> <your-email-address> line in their commit message.
This is most conveniently done by using --signoff (-s) when running git commit.`

when not all commits are signed-off.

That is good information on what the user should do the next time when contributing to the repo. But it doesn't help much to fix the current PR. Since I am only/still a beginner at git I have no good suggestion myself, but had seen

git remote update
git rebase --exec 'git commit --amend --no-edit -n -s' @{upstream}

in this comment. Assuming that this advice is useful, would it be worth to adapt helper.js accordingly?

@gabor-braun
Copy link

Recent git versions have an option --signoff for this purpose.
So one could do:

git remote update
git rebase --signoff @{upstream}

@Mo-Gul
Copy link
Author

Mo-Gul commented Dec 12, 2021

Sorry, but I am not very good at using Git, so please excuse a maybe n00bie question.

Should it be sufficient to write exactly that and only that or do I need to replace something like the @{upstream}?

I am asking because I tried that with a dummy git repository + a fork, but that didn't work ...

In case I am just to stupid, it would be great if these lines could be shown automatically in the PR. Currently one has to dig into the LOG of the action to see the advice.

Thank you in advance for your time!

@gabor-braun
Copy link

You have demonstrated that the instructions are not robust enough. I suggest the following, which should work for a typical setup for clones of the main pgf/tikz repo:

git fetch origin master
git rebase --signoff origin/master

I have changed the first command to download less: just what is needed to be up to date.


My guess in your case @{upstream} actually referred to your own fork instead of the original repo, and that's why it failed. I think this would happen to many others, too. I should have thought of it in my previous answer.

@Mo-Gul
Copy link
Author

Mo-Gul commented Dec 28, 2021

Hmm, also this doesn't work for me. Maybe this is a Windows issue. I tested with Git for Windows v2.34.1.

What did work for me is

git remote update
git rebase --signoff @~X
git push --force

where X needs to be replaced by the number of commits which should be signed.

Of course your proposals are much better than mine, because I hope that all commits in the PR/branch are signed.

@Tim-Zhang
Copy link
Collaborator

@Mo-Gul if the last commit missed the sign-off, you can use git commit --amend -s --no-edit to resolve.
if the missing commit is not the last one, use git rebase -i $pre-commit-id to reword it manually.

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

No branches or pull requests

3 participants