git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@fluxnic.net>
To: Timur Tabi <timur@freescale.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git <git@vger.kernel.org>
Subject: Re: How can I tell if a file has been updated upstream?
Date: Fri, 05 Feb 2010 12:39:18 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1002051235000.1681@xanadu.home> (raw)
In-Reply-To: <ed82fe3e1002050856v68d4d02bnbe18394bebac2f4d@mail.gmail.com>

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

  reply	other threads:[~2010-02-05 17:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 16:23 How can I tell if a file has been updated upstream? Timur Tabi
2010-02-05 16:44 ` Shawn O. Pearce
2010-02-05 16:56   ` Timur Tabi
2010-02-05 17:39     ` Nicolas Pitre [this message]
2010-02-05 16:50 ` Junio C Hamano
2010-02-05 16:57   ` Timur Tabi
2010-02-26  0:18 ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1002051235000.1681@xanadu.home \
    --to=nico@fluxnic.net \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    --cc=timur@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).