git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Joe Enzminger <joe.enzminger@exactasystems.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Feature Request git clone shallow-include
Date: Wed, 20 Feb 2019 12:06:49 -0600	[thread overview]
Message-ID: <CAApa7v_noujdWcogGNJUS7ZJRzPRxK5PPv53tST-0JoEk8+9Mw@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8AS5eNO6gACGtRZq=qdQGkQ3jmQPVivPG+=du9u9hKYcg@mail.gmail.com>

That is correct.  What you suggest is actually what I tried (using
sha-1 syntax).  For my purposes, excluding the tag's parent's but
including the tag is sufficient, but if is fairly straightforward to
extend support to the other use cases I'm sure someone would find is
useful.

Joe


On Tue, Feb 19, 2019 at 7:22 PM Duy Nguyen <pclouds@gmail.com> wrote:
>
> On Wed, Feb 20, 2019 at 7:07 AM Joe Enzminger
> <joe.enzminger@exactasystems.com> wrote:
> >
> > Currently, git clone supports shallow-exclude=<tag-name>.  The client
> > will clone up to, but not including, the commit with the tag.
> >
> > It would be useful to have the ability to include the commit with the
> > tag.  The suggestion would be to add a "shallow-include" options to
> > clone to support this behavior.
>
> So exclude the tag's parents and everything before, but keep the tag, correct?
>
> I think if we support --shallow-exclude=<tag>^ then it should work the
> way you want (if the tag is a normal merge you may need to add
> --shallow-exclude=<tag>^2 as well). And you can do even fancier thing
> like --shallow-exclude=<tag>~3 (i.e. exclude the  grand grand parent
> of the tag, but keep the tag and grand parents). We will need to
> restrict extended SHA-1 syntax to a safe subset of course.
>
> > I have tried to use shallow-exclude with a follow on git fetch
> > --deepen=1, but it always returns "fatal: error in object; unshallow
> > <sha1>"
> --
> Duy

  reply	other threads:[~2019-02-20 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20  0:05 Feature Request git clone shallow-include Joe Enzminger
2019-02-20  1:22 ` Duy Nguyen
2019-02-20 18:06   ` Joe Enzminger [this message]
2019-02-21 13:06     ` Duy Nguyen
2019-03-29 22:02       ` Joe Enzminger
2019-03-30 11:38         ` Duy Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAApa7v_noujdWcogGNJUS7ZJRzPRxK5PPv53tST-0JoEk8+9Mw@mail.gmail.com \
    --to=joe.enzminger@exactasystems.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).