Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-10-08 Thread lee
"Claes Wallin (韋嘉誠)" writes: > On 06/09/14 06:04, lee wrote: >> Hi, >> >> how would I figure out what the last commit to a remote repo was without >> first fetching or pulling the remote repo? > > $ git ls-remote origin > > ... will show you the list of references (tags, branches/heads) that > ex

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-10-07 Thread Claes Wallin (韋嘉誠)
On 06/09/14 06:04, lee wrote: > Hi, > > how would I figure out what the last commit to a remote repo was without > first fetching or pulling the remote repo? $ git ls-remote origin ... will show you the list of references (tags, branches/heads) that exist on the remote "origin", and what SHA1 the

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-21 Thread lee
Joel Rees writes: >> 2014/09/21 12:15 "lee" : >> If there were diffs shown, only the local diffs would show up. >> [...] > > Because your branch and origin/master have diverged. (Talking about HEAD > was misleading. I still get cvs/svn and git confused in this way. Sorry > about that) Afaik git

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-20 Thread Joel Rees
2014/09/21 12:15 "lee" : > > Joel Rees writes: > > > On Sun, Sep 21, 2014 at 3:43 AM, lee wrote: > >> Joel Rees writes: > >> > >>> Well, your experience with git and mine are quite different. > >>> > >>> On Sat, Sep 20, 2014 at 11:15 PM, lee wrote: > Joel Rees writes: > [...] > >>> >

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-20 Thread lee
Joel Rees writes: > On Sun, Sep 21, 2014 at 3:43 AM, lee wrote: >> Joel Rees writes: >> >>> Well, your experience with git and mine are quite different. >>> >>> On Sat, Sep 20, 2014 at 11:15 PM, lee wrote: Joel Rees writes: [...] >>> >>> Let's clear the conversation, it's too clutte

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-20 Thread Joel Rees
On Sun, Sep 21, 2014 at 3:43 AM, lee wrote: > Joel Rees writes: > >> Well, your experience with git and mine are quite different. >> >> On Sat, Sep 20, 2014 at 11:15 PM, lee wrote: >>> Joel Rees writes: >>> [...] >> >> Let's clear the conversation, it's too cluttered for me to make sense >> of

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-20 Thread lee
Joel Rees writes: > Well, your experience with git and mine are quite different. > > On Sat, Sep 20, 2014 at 11:15 PM, lee wrote: >> Joel Rees writes: >> [...] > > Let's clear the conversation, it's too cluttered for me to make sense > of it any more. > > cd to your local copy of the repository

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-20 Thread Joel Rees
Well, your experience with git and mine are quite different. On Sat, Sep 20, 2014 at 11:15 PM, lee wrote: > Joel Rees writes: > [...] Let's clear the conversation, it's too cluttered for me to make sense of it any more. cd to your local copy of the repository you want to do some work in. Try t

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-20 Thread lee
Joel Rees writes: > 2014/09/19 5:27 "lee" : >> >> Joel Rees writes: >> >> > On Sun, Sep 14, 2014 at 10:43 PM, lee wrote: >> >> Joel Rees writes: >> > >> > Hmm. So. When you do a >> > >> > git status >> > >> > on the command line, with the current working directory at the >> > appropriate p

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-19 Thread Joel Rees
2014/09/19 5:27 "lee" : > > Joel Rees writes: > > > On Sun, Sep 14, 2014 at 10:43 PM, lee wrote: > >> Joel Rees writes: > >> > >>> 2014/09/14 6:55 "lee" yun.yagibdah.de > >>> >: > > Joel Rees @ gmail.com > >>> > writes: > >>> > >>> I can't think of any reason it would be dependent on

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-18 Thread lee
Joel Rees writes: > On Sun, Sep 14, 2014 at 10:43 PM, lee wrote: >> Joel Rees writes: >> >>> 2014/09/14 6:55 "lee" yun.yagibdah.de >>> >: Joel Rees @ gmail.com >>> > writes: >>> >>> I can't think of any reason it would be dependent on https connectivity. >>> Any way you can reach the

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-14 Thread Joel Rees
On Sun, Sep 14, 2014 at 10:43 PM, lee wrote: > Joel Rees writes: > >> 2014/09/14 6:55 "lee" yun.yagibdah.de >> >: >>> >>> Joel Rees @ gmail.com >> > writes: >>> >>> > 2014/09/12 3:35 "lee" yun.yagibdah.de >> >: >>> >> >>> >> [...] >>> >> Well, I don't want to program some sort of meta-git ... I

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-14 Thread lee
Joel Rees writes: > 2014/09/14 6:55 "lee" yun.yagibdah.de > >: >> >> Joel Rees @ gmail.com > > writes: >> >> > 2014/09/12 3:35 "lee" yun.yagibdah.de > >: >> >> >> >> [...] >> >> Well, I don't want to program some sort of meta-git ... I merely want > a >> >> simple way to be informed about new co

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-14 Thread Joel Rees
2014/09/14 6:55 "lee" yun.yagibdah.de >: > > Joel Rees @ gmail.com > writes: > > > 2014/09/12 3:35 "lee" yun.yagibdah.de >: > >> > >> [...] > >> Well, I don't want to program some sort of meta-git ... I merely want a > >> simple way to be informed about new commits. > > > > I'm still wondering whe

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-13 Thread lee
Joel Rees writes: > 2014/09/12 3:35 "lee" : >> >> [...] >> Well, I don't want to program some sort of meta-git ... I merely want a >> simple way to be informed about new commits. > > I'm still wondering whether a cron job that does a status request on the > head in question wouldn't be good enou

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-11 Thread Joel Rees
2014/09/12 3:35 "lee" : > > [...] > Well, I don't want to program some sort of meta-git ... I merely want a > simple way to be informed about new commits. I'm still wondering whether a cron job that does a status request on the head in question wouldn't be good enough. Otherwise, you're asking t

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-11 Thread lee
Jonathan Dowland writes: > On Tue, Sep 09, 2014 at 10:05:33PM +0200, lee wrote: >> I'm receiving 226542 bytes in 355 lines when I do this for one of the >> repos ... and same for another one: >> >> curl https://github.com/lee-/info/git-newer/refs?service=git-upload-pack | >> wc -cl > > I suspec

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-10 Thread Jonathan Dowland
On Tue, Sep 09, 2014 at 10:05:33PM +0200, lee wrote: > I'm receiving 226542 bytes in 355 lines when I do this for one of the > repos ... and same for another one: > > curl https://github.com/lee-/info/git-newer/refs?service=git-upload-pack | wc > -cl I suspect the right URL should be http://gi

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-09 Thread Rusi Mody
On Monday, September 8, 2014 8:50:02 PM UTC+5:30, lee wrote: > Rusi Mody writes: > > On Monday, September 8, 2014 4:20:02 PM UTC+5:30, lee wrote: > >> Jonathan Dowland writes: > >> > On Sat, Sep 06, 2014 at 12:04:44AM +0200, lee wrote: > >> >> how would I figure out what the last commit to a remot

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-09 Thread lee
Jonathan Dowland writes: > On Mon, Sep 08, 2014 at 11:58:35PM +0200, lee wrote: >> One is using git:, the other one https:. > snip >> I don't have ssh access to any of the remote hosts. Both repos, I can >> only clone/fetch/merge from. > > OK. > >> But I don't want to fetch? If I can fetch only

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-09 Thread Jonathan Dowland
On Tue, Sep 09, 2014 at 09:51:12AM +0100, Jonathan Dowland wrote: > To persue this further, I'd suggest reading up on the git:// wire protocol > (quite possibly there's a command other than 'git-upload-pack' which would > give you what you want) P.S.: this is a pretty nice description of the wire

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-09 Thread Jonathan Dowland
On Mon, Sep 08, 2014 at 11:58:35PM +0200, lee wrote: > One is using git:, the other one https:. snip > I don't have ssh access to any of the remote hosts. Both repos, I can > only clone/fetch/merge from. OK. > But I don't want to fetch? If I can fetch only the data (a minimal > amount of data)

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Jonathan Dowland writes: > I've been thinking about how to answer your question properly and I realised > that the answer probably depends on which protocol you are using to pull from > the remote repo. Or more properly, which protocols the remote repo supports. One is using git:, the other one

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread Jonathan Dowland
I've been thinking about how to answer your question properly and I realised that the answer probably depends on which protocol you are using to pull from the remote repo. Or more properly, which protocols the remote repo supports. If it is listening as pure git://, or git+ssh://, then (at least i

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Tony van der Hoff writes: >> Why can't I simply ask the (server of the) remote repo "when/what was >> the last commit?". Why should I have to transfer large or huge amounts >> of data to get an information which doesn't need to take more than 4 >> bytes (i. e. a unix timestamp)? >> >> > It see

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Chris Bannister writes: > On Mon, Sep 08, 2014 at 06:29:08PM +0200, lee wrote: >> lee writes: >> >> > how would I figure out what the last commit to a remote repo was without >> > first fetching or pulling the remote repo? >> >> For now, I'm going with 'git status'. See https://github.com/lee

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread Tony van der Hoff
On 08/09/14 15:10, lee wrote: > Rusi Mody writes: > >> On Monday, September 8, 2014 4:20:02 PM UTC+5:30, lee wrote: >>> Jonathan Dowland writes: >> On Sat, Sep 06, 2014 at 12:04:44AM +0200, lee wrote: > how would I figure out what the last commit to a remote repo was without > first

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread Chris Bannister
On Mon, Sep 08, 2014 at 06:29:08PM +0200, lee wrote: > lee writes: > > > how would I figure out what the last commit to a remote repo was without > > first fetching or pulling the remote repo? > > For now, I'm going with 'git status'. See https://github.com/lee-/git-newer > > I'd still like to

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
lee writes: > how would I figure out what the last commit to a remote repo was without > first fetching or pulling the remote repo? For now, I'm going with 'git status'. See https://github.com/lee-/git-newer I'd still like to have a better way to figure out if there have been new commits ...

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Joel Rees writes: > On Mon, Sep 8, 2014 at 7:39 PM, lee wrote: >> [...] >> I have read so much documentation that I'm able to use git for what I'm >> using it. If you are aware of some documentation that would be helpful >> for the problem at hand, please feel free to point it out. > > How much

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Rusi Mody writes: > On Monday, September 8, 2014 4:20:02 PM UTC+5:30, lee wrote: >> Jonathan Dowland writes: > >> > On Sat, Sep 06, 2014 at 12:04:44AM +0200, lee wrote: >> >> how would I figure out what the last commit to a remote repo was without >> >> first fetching or pulling the remote repo?

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread Joel Rees
On Mon, Sep 8, 2014 at 7:39 PM, lee wrote: > [...] > I have read so much documentation that I'm able to use git for what I'm > using it. If you are aware of some documentation that would be helpful > for the problem at hand, please feel free to point it out. How much have you read of this:

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread Rusi Mody
On Monday, September 8, 2014 4:20:02 PM UTC+5:30, lee wrote: > Jonathan Dowland writes: > > On Sat, Sep 06, 2014 at 12:04:44AM +0200, lee wrote: > >> how would I figure out what the last commit to a remote repo was without > >> first fetching or pulling the remote repo? > > This is an interesting

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Joel Rees writes: > 2014/09/08 2:08 "lee" : >> >> Sven Joachim writes: >> >> >> Does this mean that I cannot rely on any of the output of 'git status' >> >> to decide whether there were commits or not? >> > >> > Commits where, on your local branch or on the remote one? >> >> On the remote branch

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread lee
Jonathan Dowland writes: > On Sat, Sep 06, 2014 at 12:04:44AM +0200, lee wrote: >> how would I figure out what the last commit to a remote repo was without >> first fetching or pulling the remote repo? > > This is an interesting question and I don't know the answer to it, perhaps it > is not yet

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-08 Thread Jonathan Dowland
On Sat, Sep 06, 2014 at 12:04:44AM +0200, lee wrote: > how would I figure out what the last commit to a remote repo was without > first fetching or pulling the remote repo? This is an interesting question and I don't know the answer to it, perhaps it is not yet possible. However, you might be able

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-07 Thread Joel Rees
2014/09/08 2:08 "lee" : > > Sven Joachim writes: > > >> Does this mean that I cannot rely on any of the output of 'git status' > >> to decide whether there were commits or not? > > > > Commits where, on your local branch or on the remote one? > > On the remote branch --- when they are made to my l

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-07 Thread lee
Sven Joachim writes: >> Does this mean that I cannot rely on any of the output of 'git status' >> to decide whether there were commits or not? > > Commits where, on your local branch or on the remote one? On the remote branch --- when they are made to my local copy, I will know about it anyway b

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-07 Thread lee
"Podrigal, Aron" writes: > I don't really get your problem. The problem is very simple: I want to get an email when new commits have been made to a remote repo which I have cloned (some time in the past). > Every git repository tracked by remote, has separate refs to track the > remote and sepa

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-07 Thread Joel Rees
On Sat, Sep 6, 2014 at 11:42 PM, lee wrote: > [...] > I'd find it hard to believe that there is no reasonable way to check for > new commits that have been made to a remote repo. Git can't be that > bad, can it? (Running 'git diff' for this is not reasonable, and > keeping multiple copies of rep

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-07 Thread Podrigal, Aron
I don't really get your problem. Every git repository tracked by remote, has separate refs to track the remote and separate for the local. When you do git fetch, it will only update the remote refs and not your local. Then you can do git diff origin/master to see the difference between your local a

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-07 Thread Sven Joachim
On 2014-09-07 02:01 +0200, lee wrote: > Sven Joachim writes: > >> On 2014-09-06 16:42 +0200, lee wrote: >> >>> When I run 'git diff', I don't get any output unless I have made local >>> changes which aren't committed yet. I'm not sure about 'git status': >>> >>> >>> [~/inst/emacs/emacs-git/emacs

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-06 Thread lee
Sven Joachim writes: > On 2014-09-06 16:42 +0200, lee wrote: > >> When I run 'git diff', I don't get any output unless I have made local >> changes which aren't committed yet. I'm not sure about 'git status': >> >> >> [~/inst/emacs/emacs-git/emacs] git status >> On branch master >> Your branch a

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-06 Thread Sven Joachim
On 2014-09-06 16:42 +0200, lee wrote: > When I run 'git diff', I don't get any output unless I have made local > changes which aren't committed yet. I'm not sure about 'git status': > > > [~/inst/emacs/emacs-git/emacs] git status > On branch master > Your branch and 'origin/master' have diverged,

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-06 Thread lee
Joel Rees writes: > On Sat, Sep 6, 2014 at 7:04 AM, lee wrote: >> Hi, >> >> how would I figure out what the last commit to a remote repo was without >> first fetching or pulling the remote repo? >> >> Assume that I have a local copy, say cloned yesterday. Today I would >> like to be informed au

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-05 Thread Joel Rees
On Sat, Sep 6, 2014 at 7:04 AM, lee wrote: > Hi, > > how would I figure out what the last commit to a remote repo was without > first fetching or pulling the remote repo? > > Assume that I have a local copy, say cloned yesterday. Today I would > like to be informed automatically of new commits wi

git: how to figure out with a script what the last commit on remote repo is without fetching it

2014-09-05 Thread lee
Hi, how would I figure out what the last commit to a remote repo was without first fetching or pulling the remote repo? Assume that I have a local copy, say cloned yesterday. Today I would like to be informed automatically of new commits without fetching or pulling from the remote repo. It woul