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, Feb 5, 2010 at 10:44 AM, Shawn O. Pearce <spearce@xxxxxxxxxxx> wrote:

> You can't tell a particular file, but you could use something like
> `git ls-remote refs/heads/master` to see what the branch is at,

$ git ls-remote refs/heads/master
fatal: 'refs/heads/master' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

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.

> I do this in repo, only I run `git fetch` once per day for the
> end-user.  That way the objects are local, and I can use a local
> check to see if there are updates that need to be pulled into the
> executable working directory.

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

-- 
Timur Tabi
Linux kernel developer at Freescale
--
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]