Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Release notes

## New in git-machete 3.44.2
## New in git-machete 3.45.0

- added: `machete.github.retrieveOnlyMyPullRequests` and `machete.gitlab.retrieveOnlyMyMergeRequests` git config keys
that make PR/MR-listing commands download only the current user's open PRs/MRs instead of all of them,
which can speed up operations considerably in repositories/projects with many open PRs/MRs

- fixed: `git machete discover` no longer produces a different branch tree depending on which worktree it is run from;
the fresh-branch recency ranking now aggregates HEAD reflogs across all worktrees rather than only the current one (reported by @jasonoura, contributed by @earfman)
- fixed: when run from a branch being slid out, `git machete slide-out` no longer checks out that branch's new parent if a child branch is going to be checked out right afterwards anyway for the rebase/merge
- fixed: pull/merge request-reading commands (`anno-prs`, `checkout-prs`, `retarget-pr`, `restack-pr`, `update-pr-descriptions` and their GitLab counterparts)
now address the base/target repository - the one that actually hosts the PR/MR - when the `machete.{github,gitlab}.base*` git config keys are set, rather than the head/source repository

## New in git-machete 3.44.1

Expand Down
106 changes: 101 additions & 5 deletions docs/man/git-machete.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/source/cli/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Note: ``config`` is not a command as such, just a help topic (there is no ``git
``machete.github.prDescriptionIntroStyle``
.. include:: git-config-keys/github.prDescriptionIntroStyle.rst

``machete.github.retrieveOnlyMyPullRequests``
.. include:: git-config-keys/github.retrieveOnlyMyPullRequests.rst

``machete.gitlab.{domain,remote,namespace,project,baseRemote,baseNamespace,baseProject}``
.. include:: git-config-keys/gitlab.access.rst

Expand All @@ -32,6 +35,9 @@ Note: ``config`` is not a command as such, just a help topic (there is no ``git
``machete.gitlab.mrDescriptionIntroStyle``
.. include:: git-config-keys/gitlab.mrDescriptionIntroStyle.rst

``machete.gitlab.retrieveOnlyMyMergeRequests``
.. include:: git-config-keys/gitlab.retrieveOnlyMyMergeRequests.rst

``machete.overrideForkPoint.<branch>.to``
Executing ``git machete fork-point --override-to[-parent|-inferred|=<revision>] [<branch>]`` sets up a fork point override for ``<branch>``.

Expand Down
3 changes: 3 additions & 0 deletions docs/source/cli/github.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ Create, check out and manage GitHub PRs while keeping them reflected in branch l
``machete.github.prDescriptionIntroStyle`` (``create-pr``, ``restack-pr`` and ``retarget-pr``)
.. include:: git-config-keys/github.prDescriptionIntroStyle.rst

``machete.github.retrieveOnlyMyPullRequests`` (``anno-prs``, ``checkout-prs`` and ``update-pr-descriptions``)
.. include:: git-config-keys/github.retrieveOnlyMyPullRequests.rst

**Environment variables (all subcommands)**

``GITHUB_TOKEN``
Expand Down
3 changes: 3 additions & 0 deletions docs/source/cli/gitlab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ Create, check out and manage GitLab MRs while keeping them reflected in branch l
``machete.gitlab.mrDescriptionIntroStyle`` (``create-mr``, ``restack-mr`` and ``retarget-mr``)
.. include:: git-config-keys/gitlab.mrDescriptionIntroStyle.rst

``machete.gitlab.retrieveOnlyMyMergeRequests`` (``anno-mrs``, ``checkout-mrs`` and ``update-mr-descriptions``)
.. include:: git-config-keys/gitlab.retrieveOnlyMyMergeRequests.rst

**Environment variables (all subcommands)**

``GITLAB_TOKEN``
Expand Down
7 changes: 6 additions & 1 deletion docs/source/git-config-keys/github.access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
The name of the git remote (as in ``git remote``) that git-machete pushes the head branch to.
Unless both ``machete.github.organization`` and ``machete.github.repository`` are set, this remote's URL is also inspected
to derive the GitHub organization and repository that the pull request resides in.
The pull request is operated on through the GitHub API, which addresses that organization/repository rather than a git remote.
Unless the ``machete.github.base*`` keys below point elsewhere, the pull request is operated on through the GitHub API,
which addresses that organization/repository rather than a git remote.
By default (when this key is unset), if exactly one remote's URL corresponds to GitHub, that remote is selected automatically;
set this key to disambiguate when more than one remote points to GitHub.
For example, ``git config machete.github.remote origin``
Expand All @@ -22,6 +23,10 @@
``machete.github.baseRemote``
Like ``machete.github.remote``, but used to locate the base repository that the pull request targets,
which may differ from the head repository (for example, the base in an upstream repository and the head in a fork).
Setting this key is what makes the PR-reading/-modifying commands (``anno-prs``, ``checkout-prs``, ``retarget-pr``,
``restack-pr``, ``update-pr-descriptions``) address that base repository rather than the head one.
``create-pr`` does not need it: it infers the base repository from the base branch's tracking remote,
so it already targets the correct base (even one in a separate fork/upstream repository) even when this key is unset.
Defaults to ``machete.github.remote`` when unset.
For example, ``git config machete.github.baseRemote upstream``

Expand Down
17 changes: 17 additions & 0 deletions docs/source/git-config-keys/github.retrieveOnlyMyPullRequests.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
When set to ``true``, commands that need to list open pull requests in the repository
(such as ``github anno-prs``, ``github checkout-prs`` and ``traverse`` with GitHub integration)
will only download open PRs authored by the current user (as determined from the GitHub API token),
instead of all open PRs in the repository.

This can speed up operations considerably in repositories with hundreds or thousands of open PRs,
at the cost of not being able to discover PRs opened by other users when traversing PR chains
(for example, when checking out an entire stack that includes PRs from multiple authors).

A valid GitHub API token is required when this key is set.

The ``--all`` flag to ``github checkout-prs`` and ``github update-pr-descriptions``
still downloads all open PRs in the repository, regardless of this setting.

The ``--by=<login>`` flag to ``github checkout-prs`` and ``github update-pr-descriptions``
downloads open PRs authored by the given user directly (rather than filtering the current user's PRs),
so it keeps working for any author even when this key is set.
Loading