git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baz <brian.ewins@gmail.com>
To: "Miklos Vajna" <vmiklos@frugalware.org>
Cc: "Leo Razoumov" <slonik.az@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: why no "git fetch --dry-run" ?
Date: Fri, 21 Nov 2008 23:14:59 +0000	[thread overview]
Message-ID: <2faad3050811211514u1f3eb3deg7ae597a0328c981c@mail.gmail.com> (raw)
In-Reply-To: <20081121221826.GM21815@genesis.frugalware.org>

2008/11/21 Miklos Vajna <vmiklos@frugalware.org>:
> On Fri, Nov 21, 2008 at 04:41:57PM -0500, Leo Razoumov <slonik.az@gmail.com> wrote:
>> I am curious why there is "git push --dry-run" and no "git fetch
>> --dry-run" nor "git pull --dry-run". It would make sense to keep
>> push/pull/fetch as symmetric as possible.
>> For example, I just want to see which branches, if any, changed on a
>> remote repository since my last fetch. "git fetch -v --dry-run" would
>> be handy in this case.
>
> Actually fetch - at a core level - isn't symmetric to push, the protocol
> is completely different. I haven't checked the source, but I suppose
> that the push protocol has "dry run" support, while the fetch one
> doesn't have.
>

I wrote the patch for "push --dry-run" because I was more worried
about messing up the central repository (which I can't fix) than
messing up my local repository (which I can). It just needed a few
checks added to send-pack to make it work. I guess it's not been done
for fetch yet because nobody had that itch, shouldn't be too hard to
write. Certainly, other people have asked for it.

-Baz

  reply	other threads:[~2008-11-21 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 21:41 why no "git fetch --dry-run" ? Leo Razoumov
2008-11-21 22:18 ` Miklos Vajna
2008-11-21 23:14   ` Baz [this message]
2008-11-22  0:40 ` Junio C Hamano

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=2faad3050811211514u1f3eb3deg7ae597a0328c981c@mail.gmail.com \
    --to=brian.ewins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=slonik.az@gmail.com \
    --cc=vmiklos@frugalware.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).