Module: sip-router Branch: master Commit: 2058f9802c7c9f9a53107635c7b181bafdb83c8c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2058f980...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Fri Apr 17 12:17:37 2009 +0300
Merge branch 'master' of ssh://jh@git.sip-router.org/sip-router
* 'master' of ssh://jh@git.sip-router.org/sip-router: parser: added METHOD_PUBLISH registrar: included missing lib/kcore/km_ut.h textops: added implementation of free_/fixup_regexp_none() core: commented prototype of free_/fixup_regexp_none() kex: added module documentation kex: set dependency on kmi and kcore libs kex: new module - kamailio extensions libkmi: moved mi core commands to kex module mi_fifo: start FIFO listener process using SR interface
---
looks like something wens badly wrong. i tried to push a patch to diaplan module, but also something else got done that i don't know anything about.
did this undo something that others had done or what? if so, how to fix it?
-- juha
Module: sip-router Branch: master Commit: 2058f9802c7c9f9a53107635c7b181bafdb83c8c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2058f980...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Fri Apr 17 12:17:37 2009 +0300
Merge branch 'master' of ssh://jh@git.sip-router.org/sip-router
- 'master' of ssh://jh@git.sip-router.org/sip-router: parser: added METHOD_PUBLISH registrar: included missing lib/kcore/km_ut.h textops: added implementation of free_/fixup_regexp_none() core: commented prototype of free_/fixup_regexp_none() kex: added module documentation kex: set dependency on kmi and kcore libs kex: new module - kamailio extensions libkmi: moved mi core commands to kex module mi_fifo: start FIFO listener process using SR interface
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 04/17/2009 11:23 AM, Juha Heinanen wrote:
looks like something wens badly wrong. i tried to push a patch to diaplan module, but also something else got done that i don't know anything about.
did this undo something that others had done or what? if so, how to fix it?
I think all is ok. Those are my commits from yesterday to make K default config work with SR. Probably the message is autogenerated, do not know what caused that.
Cheers, Daniel
-- juha
Module: sip-router Branch: master Commit: 2058f9802c7c9f9a53107635c7b181bafdb83c8c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2058f980...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Fri Apr 17 12:17:37 2009 +0300
Merge branch 'master' of ssh://jh@git.sip-router.org/sip-router
- 'master' of ssh://jh@git.sip-router.org/sip-router: parser: added METHOD_PUBLISH registrar: included missing lib/kcore/km_ut.h textops: added implementation of free_/fixup_regexp_none() core: commented prototype of free_/fixup_regexp_none() kex: added module documentation kex: set dependency on kmi and kcore libs kex: new module - kamailio extensions libkmi: moved mi core commands to kex module mi_fifo: start FIFO listener process using SR interface
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel-Constantin Mierla writes:
I think all is ok. Those are my commits from yesterday to make K default config work with SR. Probably the message is autogenerated, do not know what caused that.
the course of events was like this:
- i edited modules_k/dialplan/dp_repl.c and committed the change.
- then i tried to push the changes, but got an error that jan explained was due to that my local repo was not anymore up to date.
- so i went and pulled the up to date version of the repo.
- after that i did the push again and this time it worked ok, but as result, an email was send by git that claimed i had done those other things too, which was scary.
perhaps it mattered that i did the commit before i did the pull which brought my local repo up to date.
in svn world i am used to the convention that if i do commit in a particular directory, it will not affect anything else. with git looks like everything i have in my repo gets pushed no matter where i issue the command.
-- juha
On 17-04 13:02, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
I think all is ok. Those are my commits from yesterday to make K default config work with SR. Probably the message is autogenerated, do not know what caused that.
the course of events was like this:
i edited modules_k/dialplan/dp_repl.c and committed the change.
then i tried to push the changes, but got an error that jan explained was due to that my local repo was not anymore up to date.
so i went and pulled the up to date version of the repo.
after that i did the push again and this time it worked ok, but as result, an email was send by git that claimed i had done those other things too, which was scary.
perhaps it mattered that i did the commit before i did the pull which brought my local repo up to date.
Yes. It really hasn't done anything wrong, it only merged your local changes with the changes that Daniel did on the remote branch. And the merge commit message only lists the commits made by Daniel in the commit log message, but they already existed in the master branch.
There is an easy remedy to this problem which I didn't realize when I told you to do git pull first.
Next time your 'git push' fails like this because somebody else modified the remote branch, you can instruct git to "rebase" your changes on the top of the remote branch, instead of merging them. In other words, you tell git to first "undo" your local changes, save them in a temporary area, then pull latest changes from the remote branch, and re-apply your local changes again.
This can be done with 'git pull --rebase' (instead of just 'git pull'). Without the rebase command line option, the history of the branch looks like this:
A--B--C--D--E--F--+ | M-- +--1--2--+
This is what happened in your case. "D" is where you cloned the repository, commits "E" and "F" are the commits done by Daniel after you cloned it. Commits "1" and "2" are your local commits (there was only one to be precise).
"M" is the merge commit, this is the one which scared you, the one that had a long list of other commits in its commit log message.
With 'git pull --rebase', the result would have looked like this:
A--B--C--D--E--F--1--2--
I.e. there is no merge commit and your changes are aplied on top of changes done by Daniel. In this case, 'git pull --rebase' would have removed your commits "1" and "2" from the local branch, the it would have downloaded commits "E" and "F" from the remote repositorie and applied them to the local branch. After that it would have re-applied your commits "1" and "2", which were saved in a temporary directory during the process.
in svn world i am used to the convention that if i do commit in a particular directory, it will not affect anything else. with git looks like everything i have in my repo gets pushed no matter where i issue the command.
You didn't push the changes made by Daniel, they were already there, only the single merge commit which listed them in the commit log message. Unless the numbe of commits is really big, the commit log script sends one email notification per commit. So there would have been more email messages if you pushed unexpected stuff, but in your case there were only two emails, one for the merge commit and one for the new commit.
But, don't worry about all this too much, we can always fix the repository if something bad happens and there are daily backups. It takes a while to get used to a slighly different philosophy behind git, but it pays of at the end and you learn something new.
Jan.
On 17-04 13:04, Jan Janak wrote:
With 'git pull --rebase', the result would have looked like this:
A--B--C--D--E--F--1--2--
I.e. there is no merge commit and your changes are aplied on top of changes done by Daniel. In this case, 'git pull --rebase' would have removed your commits "1" and "2" from the local branch, the it would have downloaded commits "E" and "F" from the remote repositorie and applied them to the local branch. After that it would have re-applied your commits "1" and "2", which were saved in a temporary directory during the process.
Thinking about it a bit more, this is exactly how 'cvs update' and 'svn update' work, so if you are used to that behavior then you can use 'git pull --rebase'.
The extra added value feature of git over cvs/svn is that it allows you to do the commit(s) before you do the "update", and during the "update" it preserves the commit(s), including their commit log messages.
Jan.
On Apr 17, 2009 at 12:23, Juha Heinanen jh@tutpro.com wrote:
looks like something wens badly wrong. i tried to push a patch to diaplan module, but also something else got done that i don't know anything about.
did this undo something that others had done or what? if so, how to fix it?
No, it hasn't done anything bad to the code, it just added a useless merge message.
What probably happened is that you have --no-ff in your ~/.gitconfig or .git/config for the master branch and you did:
git pull ssh://jh@git.sip-router.org/sip-router master
to update your local master version. However because of the --no-ff, this forced the generation of a merge message, which later got pushed to the repo when you pushed your changes.
In general when you update your local branches, either always use git pull --ff origin <branchname> (e.g. git pull --ff origin master) or make sure you don't have --no-ff in gitconfig (but using --ff is safer since it does not depend on your config).
You want to use --no-ff (force generation of a merge message) only when you merge 2 public branches. For example let's say I want to merge andrei/foo (which is published on the public repo) with master. In this case I would do:
git checkout master git pull --ff origin master # make sure my local master is up-to-date git pull --no-ff origin andrei/foo # merge andrei/foo forcing a merge # message git push origin master:master # publish changes
There is yet another possible case: you did some changes on your local master branch, but in the mean while the public master changed (someone else pushed some changes).
In this case you could use pull to update your local copy before committing, but that would most likely add a merge message (because it won't be a fast-forward merge). Instead of a git pull, you could use git rebase:
git fetch origin # get up-to-date version of branches in origin/ git checkout master # make sure you are on your local master branch git rebase origin/master # rebase your local changes on top of the # origin version git push origin master:master
This would look much more clean from the history point of view.
I would also recommend to use a different local branch name then master for bigger changes (e.g. one derived from what your are planning to do).
For example, I do something like:
git fetch origin git checkout -b tcp_fixes origin/master # no I am on my newly created local branch tcp_fixes, which tracks # origin/master
vi ... # do some changes, & test them # prepare to commit them on master git fetch origin git rebase origin/master # rebase on the latest origin/master version git push origin HEAD:master
On the public repo the history would look as if I would have worked directly on the latest master version.
See also: http://sip-router.org/wiki/git/merge-into-master
Andrei
Module: sip-router Branch: master Commit: 2058f9802c7c9f9a53107635c7b181bafdb83c8c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2058f980...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Fri Apr 17 12:17:37 2009 +0300
Merge branch 'master' of ssh://jh@git.sip-router.org/sip-router
- 'master' of ssh://jh@git.sip-router.org/sip-router: parser: added METHOD_PUBLISH registrar: included missing lib/kcore/km_ut.h textops: added implementation of free_/fixup_regexp_none() core: commented prototype of free_/fixup_regexp_none() kex: added module documentation kex: set dependency on kmi and kcore libs kex: new module - kamailio extensions libkmi: moved mi core commands to kex module mi_fifo: start FIFO listener process using SR interface
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
This is correct. The commits mentioned below were already on the master branch and the message below only tells that you merged them in your local branch.
The change only introduced your new commit and one merge commit, the merge commit is the one described below.
The commit log message may be a bit misleading in this case, but this is how it should work.
Jan.
On 17-04 12:23, Juha Heinanen wrote:
looks like something wens badly wrong. i tried to push a patch to diaplan module, but also something else got done that i don't know anything about.
did this undo something that others had done or what? if so, how to fix it?
-- juha
Module: sip-router Branch: master Commit: 2058f9802c7c9f9a53107635c7b181bafdb83c8c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2058f980...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Fri Apr 17 12:17:37 2009 +0300
Merge branch 'master' of ssh://jh@git.sip-router.org/sip-router
- 'master' of ssh://jh@git.sip-router.org/sip-router: parser: added METHOD_PUBLISH registrar: included missing lib/kcore/km_ut.h textops: added implementation of free_/fixup_regexp_none() core: commented prototype of free_/fixup_regexp_none() kex: added module documentation kex: set dependency on kmi and kcore libs kex: new module - kamailio extensions libkmi: moved mi core commands to kex module mi_fifo: start FIFO listener process using SR interface
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev