Thread (2 messages) 2 messages, 2 authors, 2016-06-15

Re: How to check new commit availability without full fetch?

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:59

Tay Ray Chuan [off-list ref] writes:
By default, when you add a remote (with git remote add), git sets up
the fetch refspec in your config that looks like

  [remote "foo"]
    url = git://foo.com/git/foo.git
    fetch = refs/heads/*:refs/remotes/foo/*

That is to say, branches on the remote repo will be fetched into a
"safe" area, refs/remotes/foo/, away from the branches that you
normally work with in refs/heads/.

However, if you have a different config and you're fetching directly
into refs/heads/, then I can see why you would want to "peek" first
with --dry-run before fetching.
I don't.  Until all the objects are safely transferred, none of the refs
are updated, whether they are directly slurped into local branch namespace
or remote tracking branch namespace.  So no matter what the configuration
is, interrupted transfer, forced or otherwise, is safe.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help