From patchwork Thu Oct 11 23:09:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew DeVore X-Patchwork-Id: 10637587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76D6F17E1 for ; Thu, 11 Oct 2018 23:09:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6228C2BFEA for ; Thu, 11 Oct 2018 23:09:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56C252BFFC; Thu, 11 Oct 2018 23:09:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB1BF2BFEA for ; Thu, 11 Oct 2018 23:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726302AbeJLGiw (ORCPT ); Fri, 12 Oct 2018 02:38:52 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:47972 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbeJLGiv (ORCPT ); Fri, 12 Oct 2018 02:38:51 -0400 Received: by mail-pg1-f202.google.com with SMTP id o18-v6so7705636pgv.14 for ; Thu, 11 Oct 2018 16:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=N7I3RshLHncvzvT/7pE5SY78VtV4e6nwiGDO9nhApx4=; b=dJLPSrLr6QZhNR9JDphGoQ9koDbwcb7VdKt7pKqnykh2djq+Rgr31z1QkVb0KmzBFS t/zIGN4fIsFKXIALUVaPDN0D2q8LgGJxjYGkWRSop+NJcxK85joZXLQt3pjnupP0o0iN mZJxQa90dYtYdGuCZmvTtPUsi9cg8PTNktK1evbrorsmEOpb0c5oZolpyHQePhnjNZSP xt6JoHUqRKYbpn6fieBFePnPr6rBVzEob2RCAkVpqZtRLBK2ditNMcZdT4TR6qOnKC2T hzov8lrty2L+WTa7z//0Jg8O8Pd0+MjKYe/PtXbQKFGu0HfOWTsaHr58ERzK39z9kC8A Mm7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=N7I3RshLHncvzvT/7pE5SY78VtV4e6nwiGDO9nhApx4=; b=X4+u1tXYNyICqxbCDe/FS+wouyxjw4I8nFXdawfqVwTMbMDa9NuHpVVC+kb0EwFHZt rmxAFiL/oSNKcy/CKrjVl6k3/Q424+EmxGREU35YVgDedKXliF2BLnyQXUGNEARwYdnX QS8n6ujnrNYW9Js8+oJQ4LWZBfERvd26XCgqAd2rWjjjZQkZ53UvkeiYNRhotJE5AkGi dUqyrPGsX/p69tFSRFMi/PH5i2lkgLmmd2rnQDsUIM4eBhESz/GBsknDDaNswgcO8C8k nsQqiBRzkaTxoJJVwRv8LveJv1tASmqvweKX8UAiYgaEeR9sIpmvjBfpDXfYLBzjCAqg L35g== X-Gm-Message-State: ABuFfojIh0Jitzw79fdvKLTedumCH9giNDuaxOcgzpuC4lSiDlKwUuD2 zaIM0w0p8qZiAbEa+/uRUiXIJ7k6JU3VAVAFI5LNGP6nkeUVqlvtP0bOE70YjwgH3ZqbTNOvSMr +9CGYr5UxZ9J7O9m4m5Ea2uwYz1TheCPlQbzNeDtQGm3QFMYk0ZMY9L07j0s= X-Google-Smtp-Source: ACcGV609kbxrJlQhaUsYpS2xJ7Q/TkNJmq6EHmXT/aWsTTJmeU+uPYjSgYikqEt4uiHaQEvfJJ4s7WboRZxJ X-Received: by 2002:a62:c6c8:: with SMTP id x69-v6mr2066358pfk.43.1539299362717; Thu, 11 Oct 2018 16:09:22 -0700 (PDT) Date: Thu, 11 Oct 2018 16:09:01 -0700 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.1.331.ge82ca0e54c-goog Subject: [RFC PATCH 2/3] Documentation/git-rev-list: s/// From: Matthew DeVore To: git@vger.kernel.org Cc: Matthew DeVore , sbeller@google.com, git@jeffhostetler.com, jeffhost@microsoft.com, peff@peff.net, stefanbeller@gmail.com, jonathantanmy@google.com, gitster@pobox.com, pclouds@gmail.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP git-rev-list has a mode where it works on the granularity of trees and blobs, rather than commits only. When discussing this mode in documenation, it can get awkward to refer to the list of arguments that may include blobs and trees as . It is especially awkward in a follow-up patch, so prepare for that patch by renaming the argument. In addition to simply renaming the argument, also reword documentation in some places such that we include non-commit objects in our terminology. In other words, s/commit/object/ in any prose where the context obviously applies to trees and blobs in a non-pathological way. Signed-off-by: Matthew DeVore --- Documentation/git-rev-list.txt | 21 ++++++++++++--------- Documentation/rev-list-options.txt | 16 ++++++++-------- builtin/rev-list.c | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 88609ff43..b3357932c 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -60,20 +60,23 @@ SYNOPSIS [ --no-walk ] [ --do-walk ] [ --count ] [ --use-bitmap-index ] - ... [ \-- ... ] + ... [ \-- ... ] DESCRIPTION ----------- -List commits that are reachable by following the `parent` links from the -given commit(s), but exclude commits that are reachable from the one(s) -given with a '{caret}' in front of them. The output is given in reverse -chronological order by default. +List objects that are reachable by following references from the given +object(s), but exclude objects that are reachable from the one(s) given +with a '{caret}' in front of them. -You can think of this as a set operation. Commits given on the command -line form a set of commits that are reachable from any of them, and then -commits reachable from any of the ones given with '{caret}' in front are -subtracted from that set. The remaining commits are what comes out in the +By default, only commit objects are shown, and the commits are shown in +reverse chronological order. The '--object' flag causes non-commit objects +to also be shown. + +You can think of this as a set operation. Objects given on the command +line form a set of objects that are reachable from any of them, and then +objects reachable from any of the ones given with '{caret}' in front are +subtracted from that set. The remaining objects are what come out in the command's output. Various other options and paths parameters can be used to further limit the result. diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 5f1672913..c2c1c40e6 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -139,29 +139,29 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit). --all:: Pretend as if all the refs in `refs/`, along with `HEAD`, are - listed on the command line as ''. + listed on the command line as ''. --branches[=]:: Pretend as if all the refs in `refs/heads` are listed - on the command line as ''. If '' is given, limit + on the command line as ''. If '' is given, limit branches to ones matching given shell glob. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied. --tags[=]:: Pretend as if all the refs in `refs/tags` are listed - on the command line as ''. If '' is given, limit + on the command line as ''. If '' is given, limit tags to ones matching given shell glob. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied. --remotes[=]:: Pretend as if all the refs in `refs/remotes` are listed - on the command line as ''. If '' is given, limit + on the command line as ''. If '' is given, limit remote-tracking branches to ones matching given shell glob. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied. --glob=:: Pretend as if all the refs matching shell glob '' - are listed on the command line as ''. Leading 'refs/', + are listed on the command line as ''. Leading 'refs/', is automatically prepended if missing. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied. @@ -182,7 +182,7 @@ explicitly. --reflog:: Pretend as if all objects mentioned by reflogs are listed on the - command line as ``. + command line as ``. --single-worktree:: By default, all working trees will be examined by the @@ -205,9 +205,9 @@ ifndef::git-rev-list[] endif::git-rev-list[] --stdin:: - In addition to the '' listed on the command + In addition to the '' listed on the command line, read them from the standard input. If a `--` separator is - seen, stop reading commits and start reading paths to limit the + seen, stop reading objects and start reading paths to limit the result. ifdef::git-rev-list[] diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 49d6deed7..9817e6747 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -21,7 +21,7 @@ #include "object-store.h" static const char rev_list_usage[] = -"git rev-list [OPTION] ... [ -- paths... ]\n" +"git rev-list [OPTION] ... [ -- paths... ]\n" " limiting output:\n" " --max-count=\n" " --max-age=\n"