From: Ivan Zorin <ivan.a.zorin@gmail.com>
To: git@vger.kernel.org
Subject: Re: how to check remote git repo for updates without pull/fetch
Date: Fri, 19 Dec 2008 19:39:19 +0300 [thread overview]
Message-ID: <494BCE37.1080204@gmail.com> (raw)
In-Reply-To: <494BC89F.9070107@gmail.com>
> does exist some way to check remote git repository for updates without downloading any essential files?
Well, actually, I think, that I've found one of possible soulution already:
First, check remote repo:
$ git ls-remote /path/to/git/repo
<some sha1-hash> HEAD
...
Then check local repo:
$ cat .git/HEAD
ref: refs/heads/master
$ cat .git/refs/heads/master
<other sha1-hash>
So, if both hashes identical, then current working tree with HEAD, which points to "master", already up-to-dated,
but if they don't, then there is some updates at remote repo.
next prev parent reply other threads:[~2008-12-19 16:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-19 16:15 how to check remote git repo for updates without pull/fetch Ivan Zorin
2008-12-19 16:33 ` Shawn O. Pearce
2008-12-19 16:39 ` Ivan Zorin [this message]
2008-12-20 17:32 ` James Cloos
2008-12-20 23:41 ` David Aguilar
2008-12-21 0:02 ` Boyd Stephen Smith Jr.
2008-12-21 9:53 ` James Cloos
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=494BCE37.1080204@gmail.com \
--to=ivan.a.zorin@gmail.com \
--cc=git@vger.kernel.org \
/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).