Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo
- From
- Leo Razoumov <slonik.az@gmail.com>
- Date
- Dec 2, 2008, 03:08 UTC
- Message-ID
- <ee2a733e0812011908p3310cda4h46815264efee2588@mail.gmail.com>
- In-Reply-To
- <20081202024837.GB6804@coredump.intra.peff.net>
On 12/1/08, Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> [..snip..] > > > Er, what? git-fetch takes a refspec very similar to the ones used by > git-push. The real reason that (2) is not an acceptable solution is that > you can't necessarily connect to the source repo (e.g., it is on your > workstation with no ssh or git server running). > > -Peff
I am sorry, I had to be more accurate in my wording. "git fetch" with no explicit refspecs fetches everything in. It is quite cumbersome to form a refspec for git-fetch operation if you are not logged in into the "source repo" machine. git-fetch does not have a --dry-run option to help discover all the branch/tag names on the source side needed for a meaningful refspec. "git-push -v --dry-run" allows one to experiment and see what branches/tags exist at the destination and form refspecs selectively. To the best of my knowledge, git-fetch does not provide such discovery tools.
--Leo--