Re: How can I tell if a file has been updated upstream?

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

 



On Fri, 5 Feb 2010, Timur Tabi wrote:

> So maybe you meant this:
> 
> $ git ls-remote ssh://git.am.freescale.net/git/timur/bin refs/heads/master
> 20fbe12069038057cbd0d66c5a673956f7792c7d	refs/heads/master
> 
> I can use this to compare with the local HEAD.  However, this only
> tells me that the repository as a whole has changed.  I was hoping
> there would be a way to see if just the one file has change.  I.e. how
> can I get the HEAD of a *file* in a remote repository.

You can't.

You must perform a fetch and then use whatever method to compare with 
origin/master:foobar.py which is the file you're looking for.

> Yeah, I'm not keen on performing an actual download, even if it's just a fetch.

Why?  It is not like if a fetch was terribly more costly than any method 
that could get the version of a file on the remote.


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