On 2016-03-16 09:12-0000 Arjen Markus wrote:

> Hi Alan,
>
>
>
>> -----Original Message-----
>> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca]
>> Sent: Wednesday, March 16, 2016 10:08 AM
>> To: Arjen Markus
>> Cc: PLplot development list
>> Subject: git blog
>>
>> On 2016-03-16 08:04-0000 Arjen Markus wrote:
>>
>>> By the way, your most recent commits did not show up in the log. But
>> when I did "git merge -ff-only origin/master" I did get the changes.
>> Very odd.
>>
>> Probably not that odd.  "git log" generates the log _for the current 
>> branch_.  So if
>> you had checked out master branch, and invoked "git log" it would not show 
>> the
>> recent commits downloaded to origin/master by "git fetch".  In other words
>> origin/master and master are two quite distinct branches; the first is 
>> populated by
>> "git fetch", the second by fast forwarding (at least with our workflow) from 
>> some
>> other local branch (such as origin/master or some topic branch) to master.  
>> That is
>> why master has no merge commits and therefore a very clean-looking history.
>> Which allows you to "git push origin master" from that branch (which fast 
>> forwards
>> to both origin/master and the master branch at SF) and propagate that linear 
>> history.
>>
>
>
> Hm, I never noticed that before and it probably means that our receipe is not 
> quite correct or correctly described in terms of what you can expect:
>
> 2. Updating the master branch:
>
>   $ git checkout master
>
>   $ git fetch
>
>   (optional) review newly downloaded changes
>
>   $ git log origin/master
>
>   $ git merge --ff-only origin/master
>
>
>
> Using this receipe, I have always expected to see the latest commits (as 
> retrieved by "git fetch") in the log.

The above recipe is absolutely correct.

However, if you specify the branch (e.g., "git log origin/master") it
will show commits on that branch, but if you don't specify the branch
(e.g., "git log") it will show commits on the branch that is checked
out.  So my guess is you forgot to specify origin/master for the above
git log command, i.e.,

git checkout master
git fetch #updates origin/master branch from SF master
git log #shows non-updated master and not updated origin/master
git merge --ff-only origin/master #updates master

After the above, then either "git log" or "git log master" would show
the updated master branch, and if you had followed the original recipe
with "git log origin/master" any time after git fetch, it would have
shown the updated origin/master branch.

Anyhow, the next time you run

git checkout master
git fetch

then if the latter command output indicates something is being
downloaded from SF I suggest you experiment with "git log" versus "git
log origin/master" before the "git merge --ff-only origin/master" step
to confirm what I have said above.  During my first few months of
using git extensively I did such experiments myself which is why I am
confident that my mental model of what is going on with origin/master
versus master in the steps above is correct.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to