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

feature/velocity_controllers/joint_trajectory_controller rebased to indigo-devel #116

Conversation

fmessmer
Copy link
Contributor

This is a rebased version of #109

@fmessmer
Copy link
Contributor Author

Is it possible to merge this PR?
Or is there any issue left that needs to be fixed?

@adolfo-rt
Copy link
Member

Hey there. I was on holidays, hence the response latency.

Could you please squash the four relevant commits into a single one?. After that we can merge.

@fmessmer
Copy link
Contributor Author

fmessmer commented Sep 3, 2014

I have no experience in squashing stuff. How do you normally do this? I don't want to break anything...
I guess squashing commit fmessmer@7d88e79 will be a problem, right?

@bmagyar
Copy link
Member

bmagyar commented Sep 3, 2014

This is a nice way, by the book (have options not to squash some stuff):
http://stackoverflow.com/a/5189600

My personal preference (if you have a clean linear history to squash):
http://stackoverflow.com/a/5201642

In the optimal case squashing commits will leave you with a branch that has a single commit on top of the original repo. Squashing changes the history of the branch, so when you push it you will have to use "git push -f". Try squashing commits on a different branch first so that you won't endanger your PR contents.

@adolfo-rt
Copy link
Member

For this particular case, this is what I recommend:

  1. Remove the first commit, as it's a patch affecting hydro only.
  2. Squash the last three into a single one.

In git, you can do all of this in a single interactive rebase (check out @bmagyar resources for the details of what's going on):

git rebase -i 7d88e79^

This will fire up a text editor with the four commits of this PR, starting with the oldest one.

  • To get 1. done, simply remove the first line, the one containing the commit you want to get rid of. If you read the comments at the bottom, you'll see a line reading "If you remove a line here THAT COMMIT WILL BE LOST". This is what you want.
  • To get 2. done, for the last two commits (ad681d0 and 9df7530) replace the initial pick string with fixup (or f). This will squash them into 88ea74f. Fixup is "like squash, but discards the commit's log message". This is what we want, as 88ea74f contains a sufficiently good log message.
  • Save and exit. You should see a message saying
Successfully rebased and updated <your branch>
  • Verify your changes. You can check the logs with git log -n3 for example. I like to use tig for browsing git repos.
  • Since you changed the history of the branch, you need to do a force push to propagate the changes to the remote (-f below):
git push -f <remote_name> <branch_name>

@fmessmer fmessmer force-pushed the feature/velocity_controllers/JointTrajectoryController_indigo branch from 9df7530 to 4e812d8 Compare September 4, 2014 08:18
@fmessmer
Copy link
Contributor Author

fmessmer commented Sep 4, 2014

@bmagyar @adolfo-rt
Thank you guys for the detailed explanations! Squashing - yet another git feature I am now able to use... 😄

I cleaned up this PR so that in only consists of the relevant commit. This should be it!

@adolfo-rt
Copy link
Member

+1

adolfo-rt pushed a commit that referenced this pull request Sep 4, 2014
…ntTrajectoryController_indigo

feature/velocity_controllers/joint_trajectory_controller rebased to indigo-devel
@adolfo-rt adolfo-rt merged commit 47a66f1 into ros-controls:indigo-devel Sep 4, 2014
@fmessmer fmessmer deleted the feature/velocity_controllers/JointTrajectoryController_indigo branch September 4, 2014 15:43
@fmessmer fmessmer restored the feature/velocity_controllers/JointTrajectoryController_indigo branch September 4, 2014 15:43
@fmessmer fmessmer deleted the feature/velocity_controllers/JointTrajectoryController_indigo branch September 4, 2014 15:44
@davetcoleman
Copy link
Member

Yay!

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

Successfully merging this pull request may close these issues.

None yet

4 participants