Tommaso Cucinotta schreef op 14-11-2013 11:43:
On 13/11/13 09:31, Vincent van Ravesteijn wrote:
If you would have done a 'git fetch', you will retrieve the new
commits. Then, you want to reset the features/chat2 branch to the new
one tommasso pushed:
$ git checkout features/chat2
$ git reset --hard <name_of_remote>/features/chat2
On a machine of a user who never checked out features/chat2 before, the first
command would fail, wouldn't it ?
Don't you need to create first the branch locally, with smth like
git checkout -b features/chat2
or
git branch features/chat2
then the reset command ? (that forces the local branch to copy the status of
the remote one)
No. If you fetch from the remote, the local repo knows about the remote
branches:
tommaso/features/chat2
If you then checkout the branch
$ git checkout features/chat2
Branch features/chat2 set up to track remote branch features/chat2 from
tommaso.
Switched to a new branch 'features/chat2'
So, no need to create the branch yourself.
Btw, Vincent, if you like, please, have a look at features/chat2 and provide
comments. That seems pretty usable now.
One issue I'm aware of is: in case the user creates multiple views (File->New
Window), and starts the chat in multiple windows, I want a per-GuiView instance of
the whole chat machinery. However, as of now, the chat is actually a kind of
single-ton (there's only one instance of QxmppClient for the whole LyX process).
Do I need to modify the GuiView interface to allow for retrieval of this
View-specific chat instance ? I need that because I have two independent panels
(the buddies list on the left and the chat bar on the bottom) that have to be tied
together.... per-view.
Any advise ?
I don't have now (I'm busy preparing for an important academic event
tomorrow ;)).
Vincent