[PATCH git-remote-gcrypt imported] Allowing git-config to ...
Jay Colson
jay at karma.net
Thu Jul 23 11:13:37 BST 2020
Sean - thanks for the feedback. All proposed changes available here -->
https://github.com/spwhitton/git-remote-gcrypt/commit/9b3ad476c08237103d98ad0a3694f9595b94d9d7
Cheers!
Jay
On Wed, Jul 22, 2020 at 11:53 PM Sean Whitton <spwhitton at spwhitton.name>
wrote:
> Hello Jay,
>
> Thank you for the patch, but unfortunately there are still some issues.
>
> On Wed 22 Jul 2020 at 11:16AM +01, Jay Colson wrote:
>
> > diff --git a/git-remote-gcrypt b/git-remote-gcrypt
> > index 689e025..42c3d5e 100755
> > --- a/git-remote-gcrypt
> > +++ b/git-remote-gcrypt
> > @@ -748,6 +750,11 @@ do_push()
> >
> > while IFS=: read -r src_ dst_ # << +src:dst
> > do
> > + if [ "+" = "${src_:0:1}" ]
> > + then
> > + Force_passed=true
> > + fi
> > +
> > src_=${src_#+}
> > filter_to ! @Refslist "$Hex40 $dst_" "$Refslist"
>
> What happens if some of the refspecs have a + but not all of them do?
> I think you need to check for a missing +, not the presence of one.
>
> > @@ -761,6 +768,14 @@ do_push()
> > $1
> > EOF
> >
> > + if [ "$Conf_force_required" = true ] && [ "$Force_passed" != true ]
> > + then
> > + echo_die "gcrypt.force-required is set to true.
> Explicitly force push by passing --force in order to override this error."
> > + elif [ "$Force_passed" != true ]
> > + then
> > + echo_info "An implicit --force push is occuring. Please
> set 'git config --global add gcrypt.force-required true' to protect from
> implicit force pushes."
> > + fi
> > +
> > tmp_encrypted="$Tempdir/packP"
> > tmp_objlist="$Tempdir/objlP"
>
> $Force_passed should be localised to the function -- see the first few
> lines of do_push for how this is done.
>
> Rather than checking the value of $Force_passed twice, please nest the
> $Conf_force_required check inside a $Force_passed check.
>
> --
> Sean Whitton
>
--
<+353866993893>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.chiark.greenend.org.uk/pipermail/sgo-software-discuss/attachments/20200723/397ca89a/attachment.html>
More information about the sgo-software-discuss
mailing list