Re: git pull for update of netdev fails.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 20 Sep 2006, Linus Torvalds wrote:
> 
> That's a really important point. You can trivially say "I don't care". 
> It's literally one extra character. But it should be the _user_ that says 
> so, not the SCM.
> 
> The whole point of the SCM is to care.

Btw, the "+" also protects you from local errors.

Let's say that you've committed some work of your own onto a branch that 
you happen to follow. Guess what? By default, git refuses to throw your 
hard work away.

This is not just a random thing. It is in fact one of the very core issues 
of having multiple people work together on the same remote repo. We don't 
do it very much (because it's often easier for everybody to have their 
own), but the "CVS workflow" with one common repository is another example 
why WE MUST NOT JUST RESET THE HEADS!

Think about it. You and somebody else works on a common branch, using a 
common source repo. When you "fetch", you want to get all the work that 
the other person has done. But you sure as hell don't want that work to 
overwrite your own work.

So what does git do? It notices if you have a local commit on that shared 
branch (because it no longer fast-forwards to the other end), and it tells 
you exactly that: it says that branch so-and-so doesn't fast-forward, and 
refuses to overwrite it.

What would you do? You should in that case switch to the offending branch, 
AND DO A MERGE of your work and the work you shared with another person, 
and then push out the result. 

So the _last_ thing you want to happen is for your work to be silently 
just overwritten.

Trust me, git does the right thing here. No ifs, buts or maybes about it.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]