Re: Determining update/merge/current state of a workspace

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

 



On Sun, Feb 02, 2014 at 03:04:59PM -0800, David Aguilar wrote:
> I think you're looking for "git merge-base".
> 
> If you do `git merge-base HEAD origin/master`
> and its result is equal to `git rev-parse HEAD`
> then you know that master is an ancestor of origin/master
> and can be trivially fast-forwarded to origin/master.

In newer versions of git (1.8.0+), you can use "git merge-base
--is-ancestor" for this instead.  The commit message for 5907cda implies
that it is more efficient than the old way.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


[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]