From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Extending 'guix download' Date: Mon, 02 Feb 2015 23:00:39 +0100 Message-ID: <871tm8t1mg.fsf@gnu.org> References: <87pp9tjrr7.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIP36-0002BS-7P for guix-devel@gnu.org; Mon, 02 Feb 2015 17:00:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIP31-0000zq-54 for guix-devel@gnu.org; Mon, 02 Feb 2015 17:00:51 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIP31-0000zm-2N for guix-devel@gnu.org; Mon, 02 Feb 2015 17:00:47 -0500 In-Reply-To: <87pp9tjrr7.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sun, 01 Feb 2015 15:34:04 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org David Thompson skribis: > I'm looking for thoughts about what the CLI should look like for an > improved 'guix download' that is capable of downloading git repos, svn > repos, etc. in addition to files over HTTP. (It handles any scheme supported by =E2=80=98url-fetch=E2=80=99, which incl= udes mirror:// etc.) > There could be to be additional context-sensitive switches to specify > details beyond a URL. For example, git repos need a commit SHA. > > guix download --method=3Dgit --commit=3D74217b9 git@gitorious.org/foo= /foo.git > > Or perhaps more flags aren't needed and we can use a specific order of > arguments: > > guix download --method=3Dgit git@gitorious.org/foo/foo.git 74217b9 > > Or we could create subcommands for each download method: > > guix download git git@gitorious.org/foo/foo.git 74217b9 That would be useful. Option #3 is too verbose IMO. I have a slight preference for #2. The question is more whether the implementation could automatically map command-line arguments to objects (=E2=80=98git-reference=E2=80=99, =E2=80= =98svn-reference=E2=80=99, etc.), or if we=E2=80=99d rather go for something custom. The former might be nice but might result in a clumsy CLI; the latter is less elegant but might allow for a nicer CLI. WDYT? Ludo=E2=80=99.