Subject: Re: `seen' datapoint [

From: Eric Wong <[email-masked]>
Date: Mon, 29 Jun 2020 19:03:51 +0000

Jeff King <[email-masked]> wrote:
> On Mon, Jun 29, 2020 at 02:04:27AM +0000, Eric Wong wrote:
> > Junio C Hamano <[email-masked]> wrote:
> > > Eric Wong <[email-masked]> writes:
> > > 
> > > > So I had receive.denyNonFastforwards=true set, and a
> > > > special cases for `pu':
> > > >
> > > > 	fetch = +refs/heads/pu:refs/remotes/origin/pu
> > > 
> > > Hmph.  I thought receive.denyNonFastforwards was for pushing into
> > > the repository, so it is a bit puzzling that you bring up "only
> > > updates to fetch into 'pu' is allowed to be forced" like this.
> > > Such an arrangement would let you know when 'next' got rewound,
> > > which is another plus ;-)
> > 
> > Yeah, I can't recall when I started using denyNonFastforwards;
> > but it was probably a paranoid thing to ensure I'd notice if
> > `master' got rewound.
> 
> It definitely wouldn't do that, though. :) I suspect you dropped the "+"
> from your refspec around the same time (which would do what you expect).

Ah, OK.  So denyNonFastforwards was a red herring in this
particular situation.  I do push to this repo when I did more
work remotely from a laptop or another workstation, though.

This particular clone and .git/config are at least a decade old;
and possibly as old as 15 years if I just rsync-ed it over from
my previous workstation...

> > > Do you have a separate "fetch" refspec for each of the ones you are
> > > interested in?
> > 
> > Nope, I use the catch-all as you describe below
> > 
> > > Or "remote.origin.fetch = refs/heads/*:refs/remotes/origin/*" which
> > > serves as the default catch-all (which overlaps with the "pu can be
> > > fast forwarded" you showed---I don't recall how we designed such a
> > > set-up to work offhand, so I am a bit curious) works as a natural
> > > "require fast-forward in general, but a more specific rule about
> > > 'pu' allows non-fast-forward updates"?
> > 
> > I only have `+' entries for `next' and `seen',
> > the catch-all provides the rest.
> > 
> > 	fetch = +refs/heads/seen:refs/remotes/origin/seen
> > 	fetch = +refs/heads/next:refs/remotes/origin/next
> > 	fetch = refs/heads/*:refs/remotes/origin/*
> 
> I think you probably configured (or modified) that catch-all yourself.
> Both "git remote add" and "git clone" use a "+" in the refspecs they
> configure.

Right.