From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 4A5961F5AE for ; Thu, 6 May 2021 22:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230220AbhEFWE6 (ORCPT ); Thu, 6 May 2021 18:04:58 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:52914 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbhEFWE5 (ORCPT ); Thu, 6 May 2021 18:04:57 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 8B71E12BDE9; Thu, 6 May 2021 18:03:58 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=vf+e5/BmrhPMOla2lmlPOSsu/KXKOLQ9/mzkFK KSIZY=; b=s7WCX8BN0YZTVFveTEIDaGpovTa44xSx5GDDlzDf3L82srS3O1b83Y YKROL4e75hP8L8pURyAMwmCD3eVr5Nk3JC4dMNQx7Y83cnKve98ieKuQ8h5fBp1m C3FtPWJ6nsYXW4v6Q0lhEZ19UryNNxdtxESGdbpNuwxVvGD4RkqGE= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 7714212BDE5; Thu, 6 May 2021 18:03:58 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 70C8E12BD82; Thu, 6 May 2021 18:03:54 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Lars Berntzon via GitGitGadget" Cc: git@vger.kernel.org, Lars Berntzon , Lars Berntzon Subject: Re: [PATCH] doc: attempt to clarify a blurry sentence. References: Date: Fri, 07 May 2021 07:03:52 +0900 In-Reply-To: (Lars Berntzon via GitGitGadget's message of "Thu, 06 May 2021 16:37:03 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: F2BE2CC0-AEB6-11EB-AAAA-D609E328BF65-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Lars Berntzon via GitGitGadget" writes: > diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt > index a953c7c38790..bbb30c52395e 100644 > --- a/Documentation/git-push.txt > +++ b/Documentation/git-push.txt > @@ -66,10 +66,10 @@ it can be any arbitrary "SHA-1 expression", such as `master~4` or > The tells which ref on the remote side is updated with this > push. Arbitrary expressions cannot be used here, an actual ref must > be named. > -If `git push []` without any `` argument is set to > -update some ref at the destination with `` with > -`remote..push` configuration variable, `:` part can > -be omitted--such a push will update a ref that `` normally updates > +If `git push []` without any `` argument then > +git will update the remote ref as defined by `remote..push` configuration > +and it will be updated from HEAD. > +`:` part can be omitted--such a push will update a ref that `` normally updates Hmph, "If X then Git will do Y" expects X to be a full sentence with subject and verb, but I do not see any verb in `git push []` without any `` argument in the rewritten version. More importantly, the updated description is wrong. The original may be hard to follow, but what it is trying to explain is the following. Imagine that you have configured [remote "origin"] push = refs/heads/*:refs/remotes/satellite/* Imagine further that you have a local branch 'next' and you want to push it out to the "origin". You also have other local branches like 'master' and 'maint', but you do not wish to push them out right now. Under such a scenario, if you were to type $ git push origin (i.e. "`git push []` without `` argument"), such a command is set to update `refs/remotes/satellite/next` (i.e. "some ref") at the "origin" (i.e. "the destination") with `next` (i.e. "with ") via the remote.origin.push configuration variable. So this scenario satisfies the precondition of the description we are discussing. In such a case, you do not have to fully spell out $ git push origin next:refs/remotes/satellite/next in order to push your 'next' branch (which may not be the current branch) from the command line to its usual/configured destination. Instead, you can omit ":", i.e. $ git push origin next and such a push will update the remote ref that would be normally updated by the local ref named on the command line, i.e. the remote 'refs/remotes/satellite/next' will be updated with your local 'refs/heads/next'. But your 'master' and 'maint' will not be pushed to their usual/configured destinations with such a push. Again, the original may hard to read and it can use some rewriting to make it easier to read. Thanks for trying to help by attempting, and another try with the above information in mind is greatly appreciated.