Re: How to check new commit availability without full fetch?
- From
Robin Rosenberg <robin.rosenberg@dewire.com>
- Date
- Jan 11, 2010, 07:31 UTC
- Message-ID
- <201001110831.28278.robin.rosenberg@dewire.com>
- In-Reply-To
- <ee2a733e1001100312j786108fct1b4c8abd0acc5afc@mail.gmail.com>
söndagen den 10 januari 2010 12.12.09 skrev Leo Razoumov:
> Hi List, > I am trying to find a way to check availability of new commits > *before* doing fetch or pull. Unfortunately, neither fetch nor pull > take "--dry-run" option (unlike push)
Fetch has --dry-run. It's a fairly new option. The drawback is that it still does the fetch, but it does not update the refs. If you re.run it again it'll be quicker.
A faster option is to use ls-remote, but you'll have to parse the data yourself and compare with your remote refs to see what refs has changed, and that will not tell you /what/ the changes are.
-- robin