git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthew DeVore <matvore@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrn@google.com>,
	matvore@comcast.net, dstolee@microsoft.com, pclouds@gmail.com,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH] terminology tweak: prune -> path limiting
Date: Mon, 10 Dec 2018 10:57:28 -0800	[thread overview]
Message-ID: <CAMfpvhKh3xewUY-g9oVJq1o=G3w9EspoQUHc1edHUx3AD4OWfg@mail.gmail.com> (raw)
In-Reply-To: <xmqqo99v5vnc.fsf@gitster-ct.c.googlers.com>

On Sat, Dec 8, 2018 at 5:36 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Matthew DeVore <matvore@google.com> writes:
>
> > In the codebase, "prune" is a highly overloaded term, and it caused me a
> > lot of trouble to figure out what it meant when it was used in the
> > context of path limiting. Stop using the word "prune" when we really
> > mean "path limiting."
>
> path limiting is also used for two purposes.  "pruning", which is to
> cull the side branches that do not contribute the changes made to
> the paths we are interested in, and showing only the changes to the
> paths that match pathspec.
Thank you for the clarification re: side branches.

>
> AFAIK, "prune" is also used to describe unreachable loose objects,
> but that use is fairly isolated and have little risk of being
> confusing too much.  Are there other uses to make you consider it
> "highly overloaded"?

This is what I found:

git prune - cull unreachable loose objects
git fetch --prune - remove remote-tracking refs that no longer exist
at source. Also note "--prune-tags" option
git notes prune - remove notes for non-existing/unreachable objects
git worktree prune - prunes "administrative" files
git prune-packed - removes loose objects that are also in pack files
git filter-branch --prune-empty - removes commits that become empty as
a result of rewriting.

It seems there are three general categories of the use of the term -
 - to remove things from a view (e.g. in path limiting)
 - to remove loose objects for efficiency (git prune, git prune-packed)
 - to remove other things for either efficiency or to reduce cognitive
overhead (git worktree prune, git fetch --prune)

... and each of these categories has 2+ subcategories.

When I tried to figure out what "prune" and "prune_data" ("data" is
quite vague, so these two fields read like "prune_1" and "prune_2")
referred to in "revision.h", I basically did "grep -rn prune" and
looked through the results, but there were too many uses of the term
"prune" to pinpoint its meaning. If I used an IDE I might have been
able to "find usages" of struct revs's prune field, and I probably
*should have* done that, but I didn't have an IDE prepared and I
figured it wasn't important. Then an hour or so later I realized I was
still being confused by this term, and set out to figuring out what it
actually meant.


>
> My gut feeling is that the result is not reducing "overloading" in a
> meaningful way, and this change is not worth the churn, but it
> depends on the answer to the above question.
>
> Thanks.

  parent reply	other threads:[~2018-12-10 18:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 21:33 [PATCH] terminology tweak: prune -> path limiting Matthew DeVore
2018-12-09  1:36 ` Junio C Hamano
2018-12-09  1:52   ` Junio C Hamano
2018-12-10 18:57   ` Matthew DeVore [this message]
2018-12-11  1:40     ` Junio C Hamano
2018-12-11  5:16       ` MATTHEW DEVORE

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='CAMfpvhKh3xewUY-g9oVJq1o=G3w9EspoQUHc1edHUx3AD4OWfg@mail.gmail.com' \
    --to=matvore@google.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrn@google.com \
    --cc=matvore@comcast.net \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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).