git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Denton Liu <liu.denton@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] contrib/subtree: ensure only one rev is provided
Date: Thu, 7 Feb 2019 17:34:38 -0500	[thread overview]
Message-ID: <CAHqTa-3bDnAm=49uBDLWxLrpOMd6sh1ve1fmmnf5kCbVxHsawg@mail.gmail.com> (raw)
In-Reply-To: <xmqqftszpgy1.fsf@gitster-ct.c.googlers.com>

 ]0;joe - On Thu, Feb 7, 2019 at 1:54 PM Junio C Hamano
<gitster@pobox.com> wrote:
> I am not sure if the other caller is OK, though.  cmd_add_repository
> can get more than one revs, and uses the first one as $rev to read
> the tree from, expecting that this helper to ignore other ones that
> are emitted from 'git rev-parse --revs-only "$@"'.
>
> For that matter, one of the early things cmd_split does is to call
> the find_existing_splits helper with $revs, and it seems to be
> prepared to be red multiple $revs (it is passed to "git log", so I
> would expect that incoming $revs is allowed to specify bottom to
> limit the traversal, e.g. "git log maint..master").  The addition of
> "ensure_single_rev" we saw in an earlier hunk near ll.191 makes such
> call impossible.  I am not a user of subtree, so I do not know if
> it is a good change (i.e. making something nonsensical impossible to
> do is good, making something useful impossible to do is bad).

I think this generality is probably not useful and it will probably confuse
people less if we prevent it.  It was just one of those "if you don't have
any better ideas, just let people do whatever complicated thing they want"
approaches I used when I was first writing it and didn't know how people
would end up using it.

> In any case, I do not use subtree, and the last time I looked at
> this script is a long time ago, so take all of the above with a
> large grain of salt.

I don't use it very often either.  To be honest, I've noticed weird
behaviour in the version installed with git 2.11.0 in Debian, so I went back
to my own version at https://github.com/apenwarr/git-subtree.  I've been
meaning to investigate further to see what patch might have happened that
caused it to act weird; maybe it's since been fixed.

But I don't see any major problems with the patch in this thread.

Thanks!

Avery

  reply	other threads:[~2019-02-07 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 11:20 [PATCH] contrib/subtree: ensure only one rev is provided Denton Liu
2019-02-07 18:54 ` Junio C Hamano
2019-02-07 22:34   ` Avery Pennarun [this message]
2019-02-12 10:00     ` Denton Liu
2019-03-11  9:47       ` Denton Liu

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='CAHqTa-3bDnAm=49uBDLWxLrpOMd6sh1ve1fmmnf5kCbVxHsawg@mail.gmail.com' \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@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).