From owner-freebsd-git@freebsd.org Thu Dec 24 12:15:33 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FCA14C2852 for ; Thu, 24 Dec 2020 12:15:33 +0000 (UTC) (envelope-from stsp@stsp.name) Received: from einhorn-mail-out.in-berlin.de (einhorn-mail-out.in-berlin.de [217.197.80.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.in-berlin.de", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1ptq75pQz3rQr for ; Thu, 24 Dec 2020 12:15:31 +0000 (UTC) (envelope-from stsp@stsp.name) X-Envelope-From: stsp@stsp.name Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 0BOCFTOA002825 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 24 Dec 2020 13:15:29 +0100 Received: from localhost (ted.stsp.name [local]) by ted.stsp.name (OpenSMTPD) with ESMTPA id 8498fcd4; Thu, 24 Dec 2020 13:15:28 +0100 (CET) Date: Thu, 24 Dec 2020 13:15:28 +0100 From: Stefan Sperling To: Christian Weisgerber Cc: freebsd-git@freebsd.org Subject: Re: Following src with got (sic!) Message-ID: <20201224121528.GD92065@ted.stsp.name> Mail-Followup-To: Christian Weisgerber , freebsd-git@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4D1ptq75pQz3rQr X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of stsp@stsp.name has no SPF policy when checking 217.197.80.21) smtp.mailfrom=stsp@stsp.name X-Spamd-Result: default: False [-2.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[stsp.name]; RBL_DBL_DONT_QUERY_IPS(0.00)[217.197.80.21:from]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[217.197.80.21:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; SUBJECT_HAS_EXCLAIM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:217.197.80.0/20, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-git]; RCVD_IN_DNSWL_LOW(-0.10)[217.197.80.21:from] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2020 12:15:33 -0000 On Wed, Dec 23, 2020 at 08:29:12PM +0100, Christian Weisgerber wrote: > Got is a nascent version control system that uses the git repository > format and thus has some degree of interoperability with git. > http://gameoftrees.org/ > People who don't need the full git experience may be able to use > got to check out the FreeBSD src repository. There has been some > talk of importing got into base as a successor to svnlite. Meanwhile, > there's a devel/got port. Thanks for writing this up :) One small correction below: > If you feel overwhelmed by the flood of magic command lines and > configuration file sections that are being posted for git... > Well, here are some less imposing magic command lines that will > also be easier to make sense of from the got(1) man page: > > Clone the repository: > $ cd /somewhere > $ got clone -a ssh://anongit@git.freebsd.org/src.git > > Check out stable/12: > $ cd /usr > $ got checkout -b stable/12 /somewhere/src.git > > I verified with "diff -uNr -x .got -x .svn -I '\$FreeBSD.*\$'" that > this is indeed identical to a svn checkout. > > Update your source: > $ cd /usr/src > $ got fetch > $ got update -b origin/stable/12 > $ got rebase stable/12 > > This is the standard configuration which allows you to have changes > on a local branch distinct from the upstream origin/* one. > > If you are sure you don't need this, you can simplify things by > cloning a mirror of the original repository: > $ got clone -a -m ssh://anongit@git.freebsd.org/src.git > ... and updating your checked out source will simply be: > $ cd /usr/src > $ got fetch > $ got update The above commands will not result in updated files even if new changes appeared in stable/12 on the server. By default 'got fetch' will only fetch the branch corresponding to the HEAD reference of the repository, which usually points at the "main" branch. Instead, this fetches all branches: $ got fetch -a To fetch just new commits on the stable/12 branch, either use: $ got fetch -b stable/12 or add the 'stable/12' branch to the repository's got.conf(5) file: remote "origin" { server anongit@git.freebsd.org protocol ssh repository "/src.git" branch "stable/12" } Now a simple 'got fetch' implies '-b stable/12'. A collection of branches to fetch by default can be defined like this: remote "origin" { server anongit@git.freebsd.org protocol ssh repository "/src.git" branch "main" branch "stable/12" branch "stable/11" branch "stable/10" } Cheers, Stefan > You may also want to give the tog(1) repository browser a spin. > Very handy to figure out who, say, probably broke wcwidth()... > > Check it out! (pun intended) > > - - - - - > > At this time, got does not yet support cloning/fetching over https, > pushing to a remote repository, or garbage collection. Git can be > used to supply missing functionality for the time being. > > -- > Christian "naddy" Weisgerber naddy@mips.inka.de > _______________________________________________ > freebsd-git@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-git > To unsubscribe, send any mail to "freebsd-git-unsubscribe@freebsd.org" >