aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2018-08-12 12:18:00 -0500
committerJonas Bernoulli <jonas@bernoul.li>2018-12-26 20:09:06 +0100
commit51d562f0e5870254cd1afd7c03ad495a4911a6c4 (patch)
treee8ed2d83bf03869c9f299a4f8e14dfc9c78cb243
parent50b5aad124a07614b5e3819c9f81915a454e08fc (diff)
Remove some collaboration commands in favor of the Forge package
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md2
-rw-r--r--.travis.yml6
-rw-r--r--Documentation/RelNotes/2.91.0.org4
-rw-r--r--Documentation/magit.org132
-rw-r--r--Documentation/magit.texi161
-rw-r--r--Makefile3
-rw-r--r--default.mk34
-rw-r--r--lisp/Makefile3
-rw-r--r--lisp/magit-branch.el80
-rw-r--r--lisp/magit-collab.el174
-rw-r--r--lisp/magit-merge.el6
-rw-r--r--lisp/magit-pkg.el1
-rw-r--r--lisp/magit-utils.el3
-rw-r--r--lisp/magit-worktree.el34
-rw-r--r--lisp/magit.el1
15 files changed, 35 insertions, 609 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index a949c5a..4ad3910 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -25,7 +25,7 @@ Alternatively, run `M-x magit-emacs-Q-command RET` to save a shell command to th
Finally, if that didn't work and you have installed Magit from Melpa, then run commands similar to the ones below, but use tab completion to replace the various Ns with the correct versions:
$ cd ~/.emacs.d/elpa/magit-N
- $ emacs -Q --debug-init --eval '(setq debug-on-error t)' -L ../dash-N -L ../git-commit-N -L ../magit-popup-N -L ../with-editor-N -L ../ghub-N -L . -l magit
+ $ emacs -Q --debug-init --eval '(setq debug-on-error t)' -L ../dash-N -L ../git-commit-N -L ../magit-popup-N -L ../with-editor-N -L . -l magit
More debugging tools are described in the manual [6].
diff --git a/.travis.yml b/.travis.yml
index 783c808..e04c77e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,13 +19,9 @@ install:
- tar -xaf emacs-bin-${EMACS_VERSION}.tar.gz -C /
- export EMACS=/tmp/emacs/bin/emacs
- $CURL -O ${GHRAW}/magnars/dash.el/master/dash.el
- - $CURL -O ${GHRAW}/magit/ghub/master/ghub.el
- - $CURL -O ${GHRAW}/magit/ghub/master/ghub-graphql.el
- - $CURL -O ${GHRAW}/vermiculus/graphql.el/master/graphql.el
- $CURL -O ${GHRAW}/magit/magit-popup/master/magit-popup.el
- - $CURL -O ${GHRAW}/volrath/treepy.el/master/treepy.el
- $CURL -O ${GHRAW}/magit/with-editor/master/with-editor.el
- - $EMACS -Q --batch -L . -f batch-byte-compile dash.el ghub.el ghub-graphql.el graphql.el magit-popup.el treepy.el with-editor.el
+ - $EMACS -Q --batch -L . -f batch-byte-compile dash.el magit-popup.el with-editor.el
- $EMACS --version
script:
- git config --global user.name "A U Thor"
diff --git a/Documentation/RelNotes/2.91.0.org b/Documentation/RelNotes/2.91.0.org
index bf73666..2540a2f 100644
--- a/Documentation/RelNotes/2.91.0.org
+++ b/Documentation/RelNotes/2.91.0.org
@@ -1,6 +1,10 @@
* Magit v2.91.0 Release Notes (unreleased)
** Breaking changes
+- The commands ~magit-branch-pull-request~, ~magit-checkout-pull-request~
+ and ~magit-worktree-checkout-pull-request~ were removed in favor of
+ improved implementations provided by the new Forge package.
+
- ~C-c C-e~ is no longer bound to ~magit-dispatch-popup~. It is bound
to ~magit-edit-thing~ now, so that Forge can add section-specific
bindings using this key. ~magit-dispatch-popup~ continues to be
diff --git a/Documentation/magit.org b/Documentation/magit.org
index 82e532c..7760f6a 100644
--- a/Documentation/magit.org
+++ b/Documentation/magit.org
@@ -8,7 +8,7 @@
#+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: Magit: (magit).
#+TEXINFO_DIR_DESC: Using Git from Emacs with Magit.
-#+SUBTITLE: for version 2.90.1 (v2.90.1-53-g279ae8b47+1)
+#+SUBTITLE: for version 2.90.1 (v2.90.1-79-g50b5aad12+1)
#+BIND: ox-texinfo+-before-export-hook ox-texinfo+-update-version-strings
#+TEXINFO_DEFFN: t
@@ -23,7 +23,7 @@ directly from within Emacs. While many fine Git clients exist, only
Magit and Git itself deserve to be called porcelains.
#+TEXINFO: @noindent
-This manual is for Magit version 2.90.1 (v2.90.1-53-g279ae8b47+1).
+This manual is for Magit version 2.90.1 (v2.90.1-79-g50b5aad12+1).
#+BEGIN_QUOTE
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@bernoul.li>
@@ -165,10 +165,10 @@ Now see [[*Post-Installation Tasks]].
** Installing from the Git Repository
-Magit depends on the ~dash~, ~ghub~, ~graphql~, ~magit-popup~, ~treepy~ and
-~with-editor~ libraries which are available from Melpa and Melpa-Stable.
-Install them using ~M-x package-install RET <package> RET~. Of course
-you may also install them manually from their repository.
+Magit depends on the ~dash~, ~magit-popup~, and ~with-editor~ libraries
+which are available from Melpa and Melpa-Stable. Install them using
+~M-x package-install RET <package> RET~. Of course you may also install
+them manually from their repository.
Then clone the Magit repository:
@@ -183,19 +183,15 @@ Then compile the libraries and generate the info manuals:
$ make
#+END_SRC
-If you haven't installed ~dash~, ~ghub~, ~graphql~, ~magit-popup~, ~treepy~ and
-~with-editor~ from Melpa or at ~/path/to/magit/../<package>~, then you
-have to tell ~make~ where to find them. To do so create the file
-~/path/to/magit/config.mk~ with the following content before running
-~make~:
+If you haven't installed ~dash~, ~magit-popup~ and ~with-editor~ from Melpa
+or at ~/path/to/magit/../<package>~, then you have to tell ~make~ where to
+find them. To do so create the file ~/path/to/magit/config.mk~ with the
+following content before running ~make~:
#+BEGIN_SRC makefile
LOAD_PATH = -L /path/to/magit/lisp
LOAD_PATH += -L /path/to/dash
- LOAD_PATH += -L /path/to/ghub
- LOAD_PATH += -L /path/to/graphql
LOAD_PATH += -L /path/to/magit-popup
- LOAD_PATH += -L /path/to/treepy
LOAD_PATH += -L /path/to/with-editor
#+END_SRC
@@ -4366,107 +4362,6 @@ features are available from separate popups.
branch. If FROM is not reachable from ~HEAD~ or is reachable from the
source branch's upstream, then an error is raised.
-- Key: b Y, magit-branch-pull-request
-
- This command creates and configures a new branch from a Github
- pull-request, creating and configuring a new remote if necessary.
-
- The name of the local branch is the same as the name of the remote
- branch that you are being asked to merge, unless the contributor
- could not be bother to properly name the branch before opening the
- pull-request. The most likely such case is when you are being asked
- to merge something like "fork/master" into "origin/master". In such
- cases the local branch will be named "pr-N", where ~N~ is the
- pull-request number.
-
- These variables are always set by this command:
-
- - ~branch.<name>.pullRequest~ is set to the pull-request number.
- - ~branch.<name>.pullRequestRemote~ is set to the remote on which the
- pull-request branch is located.
- - ~branch.<name>.pushRemote~ is set to the same remote as
- ~branch.<name>.pullRequestRemote~ if that is possible, otherwise
- it is set to the upstream remote.
- - ~branch.<name>.description~ is set to the pull-request title.
- - ~branch.<name>.rebase~ is set to ~true~ because there should be no
- merge commits among the commits in a pull-request.
-
- This command also configures the upstream and the push-remote of the
- local branch that it creates.
-
- The branch against which the pull-request was opened, is always used
- as the upstream. This makes it easy to see what commits you are
- being asked to merge in the section titled something like "Unmerged
- into origin/master".
-
- Like for other commands that create a branch it depends on the
- option ~magit-branch-prefer-remote-upstream~ whether the remote branch
- itself or the respective local branch is used as the upstream, so
- this section may also be titled e.g. "Unmerged into master".
-
- When necessary and possible, then the remote pull-request branch is
- configured to be used as the push-target. This makes it easy to see
- what further changes the contributor has made since you last
- reviewed their changes in the section titled something like
- "Unpulled from origin/new-feature" or "Unpulled from
- fork/new-feature".
-
- - If the pull-request branch is located in the upstream repository,
- then you probably have set ~remote.pushDefault~ to that repository.
- However some users like to set that variable to their personal
- fork, even if they have push access to the upstream, so
- ~branch.<name>.pushRemote~ is set anyway.
-
- - If the pull-request branch is located inside a fork, then you are
- usually able to push to that branch, because Github by default
- allows the recipient of a pull-request to push to the remote
- pull-request branch even if it is located in a fork. The
- contributor has to explicitly disable this.
-
- - If you are not allowed to push to the pull-request branch on
- the fork, then a branch by the same name located in the
- upstream repository is configured as the push-target.
-
- - A — sadly rather common — special case is when the contributor
- didn't bother to use a dedicated branch for the pull-request.
-
- The most likely such case is when you are being asked to merge
- something like "fork/master" into "origin/master". The special
- push permission mentioned above is never granted for the branch
- that is the repository's default branch, and that would almost
- certainly be the case in this scenario.
-
- To enable you to easily push somewhere anyway, the local branch
- is named "pr-N" (where ~N~ is the pull-request number) and the
- upstream repository is used as the push-remote.
-
- - Finally, if you are allowed to push to the pull-request branch
- and the contributor had the foresight to use a dedicated branch,
- then the fork is configured as the push-remote.
-
- The push-remote is configured using ~branch.<name>.pushRemote~, even
- if the used value is identical to that of ~remote.pushDefault~, just
- in case you change the value of the latter later on. Additionally
- the variable ~branch.<name>.pullRequestRemote~ is set to the remote
- on which the pull-request branch is located.
-
- When you later delete the local pull-request branch, then you are
- offered to also delete the corresponding remote, provided it is not
- the upstream remote and that the tracking branch that corresponds to
- the deleted branch is the only remaining tracked branch. If you
- don't confirm, then only the tracking branch itself is deleted in
- addition to the local branch.
-
- Do not delete the tracking branch instead of the local branch. The
- cleanup mentioned in the previous paragraph is not performed if you
- do that.
-
-- Key: b y, magit-checkout-pull-request
-
- This command creates and configures a new branch from a pull
- request, the same way ~magit-branch-pull-request~ does. Additionally
- it checks out the new branch.
-
- Key: b x, magit-branch-reset
This command resets a branch, defaulting to the branch at point, to
@@ -6321,13 +6216,6 @@ Also see [[man:git-worktree]]
Create a new BRANCH and check it out in a new worktree at PATH.
-- Key: % p, magit-worktree-checkout-pull-request
-
- Create, configure and checkout a new worktree from a pull-request.
-
- This is like ~magit-checkout-pull-request~ (which see) except that it
- also creates a new worktree.
-
- Key: % k, magit-worktree-delete
Delete a worktree, defaulting to the worktree at point.
diff --git a/Documentation/magit.texi b/Documentation/magit.texi
index 23417f1..bd705c3 100644
--- a/Documentation/magit.texi
+++ b/Documentation/magit.texi
@@ -31,7 +31,7 @@ General Public License for more details.
@finalout
@titlepage
@title Magit User Manual
-@subtitle for version 2.90.1 (v2.90.1-53-g279ae8b47+1)
+@subtitle for version 2.90.1 (v2.90.1-79-g50b5aad12+1)
@author Jonas Bernoulli
@page
@vskip 0pt plus 1filll
@@ -53,7 +53,7 @@ directly from within Emacs. While many fine Git clients exist, only
Magit and Git itself deserve to be called porcelains.
@noindent
-This manual is for Magit version 2.90.1 (v2.90.1-53-g279ae8b47+1).
+This manual is for Magit version 2.90.1 (v2.90.1-79-g50b5aad12+1).
@quotation
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@@bernoul.li>
@@ -481,10 +481,10 @@ Now see @ref{Post-Installation Tasks}.
@node Installing from the Git Repository
@section Installing from the Git Repository
-Magit depends on the @code{dash}, @code{ghub}, @code{graphql}, @code{magit-popup}, @code{treepy} and
-@code{with-editor} libraries which are available from Melpa and Melpa-Stable.
-Install them using @code{M-x package-install RET <package> RET}. Of course
-you may also install them manually from their repository.
+Magit depends on the @code{dash}, @code{magit-popup}, and @code{with-editor} libraries
+which are available from Melpa and Melpa-Stable. Install them using
+@code{M-x package-install RET <package> RET}. Of course you may also install
+them manually from their repository.
Then clone the Magit repository:
@@ -499,19 +499,15 @@ Then compile the libraries and generate the info manuals:
$ make
@end example
-If you haven't installed @code{dash}, @code{ghub}, @code{graphql}, @code{magit-popup}, @code{treepy} and
-@code{with-editor} from Melpa or at @code{/path/to/magit/../<package>}, then you
-have to tell @code{make} where to find them. To do so create the file
-@code{/path/to/magit/config.mk} with the following content before running
-@code{make}:
+If you haven't installed @code{dash}, @code{magit-popup} and @code{with-editor} from Melpa
+or at @code{/path/to/magit/../<package>}, then you have to tell @code{make} where to
+find them. To do so create the file @code{/path/to/magit/config.mk} with the
+following content before running @code{make}:
@example
LOAD_PATH = -L /path/to/magit/lisp
LOAD_PATH += -L /path/to/dash
-LOAD_PATH += -L /path/to/ghub
-LOAD_PATH += -L /path/to/graphql
LOAD_PATH += -L /path/to/magit-popup
-LOAD_PATH += -L /path/to/treepy
LOAD_PATH += -L /path/to/with-editor
@end example
@@ -5915,134 +5911,6 @@ matter, all commits between FROM and @code{HEAD} are moved to the new
branch. If FROM is not reachable from @code{HEAD} or is reachable from the
source branch's upstream, then an error is raised.
-@kindex b Y
-@cindex magit-branch-pull-request
-@item @kbd{b Y} @tie{}@tie{}@tie{}@tie{}(@code{magit-branch-pull-request})
-
-This command creates and configures a new branch from a Github
-pull-request, creating and configuring a new remote if necessary.
-
-The name of the local branch is the same as the name of the remote
-branch that you are being asked to merge, unless the contributor
-could not be bother to properly name the branch before opening the
-pull-request. The most likely such case is when you are being asked
-to merge something like "fork/master" into "origin/master". In such
-cases the local branch will be named "pr-N", where @code{N} is the
-pull-request number.
-
-These variables are always set by this command:
-
-@itemize
-@item
-@code{branch.<name>.pullRequest} is set to the pull-request number.
-
-@item
-@code{branch.<name>.pullRequestRemote} is set to the remote on which the
-pull-request branch is located.
-
-@item
-@code{branch.<name>.pushRemote} is set to the same remote as
-@code{branch.<name>.pullRequestRemote} if that is possible, otherwise
-it is set to the upstream remote.
-
-@item
-@code{branch.<name>.description} is set to the pull-request title.
-
-@item
-@code{branch.<name>.rebase} is set to @code{true} because there should be no
-merge commits among the commits in a pull-request.
-@end itemize
-
-This command also configures the upstream and the push-remote of the
-local branch that it creates.
-
-The branch against which the pull-request was opened, is always used
-as the upstream. This makes it easy to see what commits you are
-being asked to merge in the section titled something like "Unmerged
-into origin/master".
-
-Like for other commands that create a branch it depends on the
-option @code{magit-branch-prefer-remote-upstream} whether the remote branch
-itself or the respective local branch is used as the upstream, so
-this section may also be titled e.g. "Unmerged into master".
-
-When necessary and possible, then the remote pull-request branch is
-configured to be used as the push-target. This makes it easy to see
-what further changes the contributor has made since you last
-reviewed their changes in the section titled something like
-"Unpulled from origin/new-feature" or "Unpulled from
-fork/new-feature".
-
-@itemize
-@item
-If the pull-request branch is located in the upstream repository,
-then you probably have set @code{remote.pushDefault} to that repository.
-However some users like to set that variable to their personal
-fork, even if they have push access to the upstream, so
-@code{branch.<name>.pushRemote} is set anyway.
-
-
-@item
-If the pull-request branch is located inside a fork, then you are
-usually able to push to that branch, because Github by default
-allows the recipient of a pull-request to push to the remote
-pull-request branch even if it is located in a fork. The
-contributor has to explicitly disable this.
-
-@itemize
-@item
-If you are not allowed to push to the pull-request branch on
-the fork, then a branch by the same name located in the
-upstream repository is configured as the push-target.
-
-
-@item
-A — sadly rather common — special case is when the contributor
-didn't bother to use a dedicated branch for the pull-request.
-
-The most likely such case is when you are being asked to merge
-something like "fork/master" into "origin/master". The special
-push permission mentioned above is never granted for the branch
-that is the repository's default branch, and that would almost
-certainly be the case in this scenario.
-
-To enable you to easily push somewhere anyway, the local branch
-is named "pr-N" (where @code{N} is the pull-request number) and the
-upstream repository is used as the push-remote.
-
-
-@item
-Finally, if you are allowed to push to the pull-request branch
-and the contributor had the foresight to use a dedicated branch,
-then the fork is configured as the push-remote.
-@end itemize
-
-The push-remote is configured using @code{branch.<name>.pushRemote}, even
-if the used value is identical to that of @code{remote.pushDefault}, just
-in case you change the value of the latter later on. Additionally
-the variable @code{branch.<name>.pullRequestRemote} is set to the remote
-on which the pull-request branch is located.
-@end itemize
-
-When you later delete the local pull-request branch, then you are
-offered to also delete the corresponding remote, provided it is not
-the upstream remote and that the tracking branch that corresponds to
-the deleted branch is the only remaining tracked branch. If you
-don't confirm, then only the tracking branch itself is deleted in
-addition to the local branch.
-
-Do not delete the tracking branch instead of the local branch. The
-cleanup mentioned in the previous paragraph is not performed if you
-do that.
-
-@kindex b y
-@cindex magit-checkout-pull-request
-@item @kbd{b y} @tie{}@tie{}@tie{}@tie{}(@code{magit-checkout-pull-request})
-
-This command creates and configures a new branch from a pull
-request, the same way @code{magit-branch-pull-request} does. Additionally
-it checks out the new branch.
-
@kindex b x
@cindex magit-branch-reset
@item @kbd{b x} @tie{}@tie{}@tie{}@tie{}(@code{magit-branch-reset})
@@ -8702,15 +8570,6 @@ Checkout BRANCH in a new worktree at PATH@.
Create a new BRANCH and check it out in a new worktree at PATH@.
-@kindex % p
-@cindex magit-worktree-checkout-pull-request
-@item @kbd{% p} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-checkout-pull-request})
-
-Create, configure and checkout a new worktree from a pull-request.
-
-This is like @code{magit-checkout-pull-request} (which see) except that it
-also creates a new worktree.
-
@kindex % k
@cindex magit-worktree-delete
@item @kbd{% k} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-delete})
diff --git a/Makefile b/Makefile
index 6aa5758..6152fec 100644
--- a/Makefile
+++ b/Makefile
@@ -204,7 +204,6 @@ define set_package_requires
'((emacs ,emacs-version) ;'
(async ,async-version)
(dash ,dash-version)
- (ghub ,ghub-version)
(git-commit ,git-commit-version)
(magit-popup ,magit-popup-version)
(with-editor ,with-editor-version)))))
@@ -221,7 +220,6 @@ bump-versions-1:
(emacs-version \"$(EMACS_VERSION)\")\
(async-version \"$(ASYNC_VERSION)\")\
(dash-version \"$(DASH_VERSION)\")\
- (ghub-version \"$(GHUB_VERSION)\")\
(git-commit-version \"$(GIT_COMMIT_VERSION)\")\
(magit-popup-version \"$(MAGIT_POPUP_VERSION)\")\
(with-editor-version \"$(WITH_EDITOR_VERSION)\"))\
@@ -232,7 +230,6 @@ bump-snapshots:
(emacs-version \"$(EMACS_VERSION)\")\
(async-version \"$(ASYNC_MELPA_SNAPSHOT)\")\
(dash-version \"$(DASH_MELPA_SNAPSHOT)\")\
- (ghub-version \"$(GHUB_MELPA_SNAPSHOT)\")\
(git-commit-version \"$(GIT_COMMIT_MELPA_SNAPSHOT)\")\
(magit-popup-version \"$(MAGIT_POPUP_MELPA_SNAPSHOT)\")\
(with-editor-version \"$(WITH_EDITOR_MELPA_SNAPSHOT)\"))\
diff --git a/default.mk b/default.mk
index 1629aa3..076728c 100644
--- a/default.mk
+++ b/default.mk
@@ -63,7 +63,6 @@ ELS += magit.el
ELS += magit-status.el
ELS += magit-refs.el
ELS += magit-files.el
-ELS += magit-collab.el
ELS += magit-reset.el
ELS += magit-branch.el
ELS += magit-merge.el
@@ -100,14 +99,12 @@ VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut -c
ASYNC_VERSION = 1.9.3
DASH_VERSION = 2.14.1
-GHUB_VERSION = 3.0.0
-GIT_COMMIT_VERSION = 2.90.0
-MAGIT_POPUP_VERSION = 2.12.4
+GIT_COMMIT_VERSION = 2.91.0
+MAGIT_POPUP_VERSION = 2.12.5
WITH_EDITOR_VERSION = 2.8.0
ASYNC_MELPA_SNAPSHOT = 20180527
DASH_MELPA_SNAPSHOT = 20180910
-GHUB_MELPA_SNAPSHOT = 20181107
GIT_COMMIT_MELPA_SNAPSHOT = 20181104
MAGIT_POPUP_MELPA_SNAPSHOT = 20181003
WITH_EDITOR_MELPA_SNAPSHOT = 20181103
@@ -133,20 +130,6 @@ ifeq "$(DASH_DIR)" ""
DASH_DIR = $(TOP)../dash
endif
-GHUB_DIR ?= $(shell \
- find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/ghub-[.0-9]*' 2> /dev/null | \
- sort | tail -n 1)
-ifeq "$(GHUB_DIR)" ""
- GHUB_DIR = $(TOP)../ghub
-endif
-
-GRAPHQL_DIR ?= $(shell \
- find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/graphql-[.0-9]*' 2> /dev/null | \
- sort | tail -n 1)
-ifeq "$(GRAPHQL_DIR)" ""
- GRAPHQL_DIR = $(TOP)../graphql
-endif
-
MAGIT_POPUP_DIR ?= $(shell \
find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/magit-popup-[.0-9]*' 2> /dev/null | \
sort | tail -n 1)
@@ -154,13 +137,6 @@ ifeq "$(MAGIT_POPUP_DIR)" ""
MAGIT_POPUP_DIR = $(TOP)../magit-popup
endif
-TREEPY_DIR ?= $(shell \
- find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/treepy-[.0-9]*' 2> /dev/null | \
- sort | tail -n 1)
-ifeq "$(TREEPY_DIR)" ""
- TREEPY_DIR = $(TOP)../treepy
-endif
-
WITH_EDITOR_DIR ?= $(shell \
find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/with-editor-[.0-9]*' 2> /dev/null | \
sort | tail -n 1)
@@ -181,17 +157,11 @@ LOAD_PATH = -L $(TOP)/lisp
ifdef CYGPATH
LOAD_PATH += -L $(shell cygpath --mixed $(DASH_DIR))
- LOAD_PATH += -L $(shell cygpath --mixed $(GHUB_DIR))
- LOAD_PATH += -L $(shell cygpath --mixed $(GRAPHQL_DIR))
LOAD_PATH += -L $(shell cygpath --mixed $(MAGIT_POPUP_DIR))
- LOAD_PATH += -L $(shell cygpath --mixed $(TREEPY_DIR))
LOAD_PATH += -L $(shell cygpath --mixed $(WITH_EDITOR_DIR))
else
LOAD_PATH += -L $(DASH_DIR)
- LOAD_PATH += -L $(GHUB_DIR)
- LOAD_PATH += -L $(GRAPHQL_DIR)
LOAD_PATH += -L $(MAGIT_POPUP_DIR)
- LOAD_PATH += -L $(TREEPY_DIR)
LOAD_PATH += -L $(WITH_EDITOR_DIR)
endif
diff --git a/lisp/Makefile b/lisp/Makefile
index 216a2ea..84cf365 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -31,9 +31,8 @@ magit.elc: git-commit.elc magit-core.elc magit-diff.elc \
magit-status.elc: magit.elc
magit-refs.elc: magit.elc
magit-files.elc: magit.elc
-magit-collab.elc: magit.elc
magit-reset.elc: magit.elc
-magit-branch.elc: magit.elc magit-collab.elc magit-reset.elc
+magit-branch.elc: magit.elc magit-reset.elc
magit-merge.elc: magit.elc
magit-tag.elc: magit.elc
magit-worktree.elc: magit.elc
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index 6de5bbf..e181256 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -35,7 +35,6 @@
(require 'subr-x))
(require 'magit)
-(require 'magit-collab)
(require 'magit-reset)
;;; Options
@@ -211,7 +210,7 @@ and change branch related variables."
:variables (lambda ()
(and magit-branch-popup-show-variables
magit-branch-config-variables))
- :actions `((?b "Checkout" magit-checkout) nil
+ :actions '((?b "Checkout" magit-checkout) nil
(?C "Configure..." magit-branch-config-popup)
(?l "Checkout local branch" magit-branch-checkout)
(?s "Create new spin-off" magit-branch-spinoff)
@@ -221,10 +220,7 @@ and change branch related variables."
(?x "Reset" magit-branch-reset)
(?w "Checkout new worktree" magit-worktree-checkout)
(?W "Create new worktree" magit-worktree-branch)
- (?k "Delete" magit-branch-delete)
- ,@(and (not (require (quote forge) nil t))
- '((?y "Checkout pull-request" magit-checkout-pull-request)
- (?Y "Create from pull-request" magit-branch-pull-request))))
+ (?k "Delete" magit-branch-delete))
:default-action 'magit-checkout
:max-action-columns 3
:setup-function 'magit-branch-popup-setup)
@@ -374,78 +370,6 @@ when using `magit-branch-and-checkout'."
(interactive (magit-branch-read-args "Create and checkout orphan branch"))
(magit-run-git "checkout" "--orphan" args branch start-point))
-;;;###autoload
-(defun magit-branch-pull-request (pr)
- "Create and configure a new branch from a pull-request.
-Please see the manual for more information."
- (interactive (list (magit-read-pull-request "Branch pull request")))
- (let-alist pr
- (let* ((upstream (or (--first (magit--github-url-equal
- (magit-get "remote" it "url")
- .base.repo.ssh_url)
- (magit-list-remotes))
- (user-error
- "Upstream repository %s not available as a remote"
- .base.repo.ssh_url)))
- (upstream-url (magit-get "remote" upstream "url"))
- (remote .head.repo.owner.login)
- (branch (magit--pullreq-branch pr t))
- (pr-branch .head.ref))
- (if (magit--pullreq-from-upstream-p pr)
- (let ((tracking (concat upstream "/" pr-branch)))
- (unless (magit-branch-p tracking)
- (magit-call-git "fetch" upstream))
- (let ((inhibit-magit-refresh t))
- (magit-branch-create branch tracking))
- (magit-set upstream "branch" branch "pushRemote")
- (magit-set upstream "branch" branch "pullRequestRemote"))
- (if (magit-remote-p remote)
- (let ((url (magit-get "remote" remote "url"))
- (fetch (magit-get-all "remote" remote "fetch")))
- (unless (magit--github-url-equal url .head.repo.ssh_url)
- (user-error
- "Remote `%s' already exists but does not point to %s"
- remote url))
- (unless (member (format "+refs/heads/*:refs/remotes/%s/*" remote)
- fetch)
- (magit-call-git "remote" "set-branches"
- "--add" remote pr-branch)
- (magit-call-git "fetch" remote)))
- (magit-call-git
- "remote" "add" "-f" "--no-tags"
- "-t" pr-branch remote
- (cond ((or (string-prefix-p "git@" upstream-url)
- (string-prefix-p "ssh://git@" upstream-url))
- .head.repo.ssh_url)
- ((string-prefix-p "https://" upstream-url)
- .head.repo.clone_url)
- ((string-prefix-p "git://" upstream-url)
- .head.repo.git_url)
- (t (error "%s has an unexpected format" upstream-url)))))
- (magit-call-git "branch" branch (concat remote "/" pr-branch))
- (if (or .locked (not (equal branch pr-branch)))
- (magit-set upstream "branch" branch "pushRemote")
- (magit-set remote "branch" branch "pushRemote"))
- (magit-set remote "branch" branch "pullRequestRemote"))
- (magit-set "true" "branch" branch "rebase")
- (magit-call-git "branch" branch
- (concat "--set-upstream-to="
- (if magit-branch-prefer-remote-upstream
- (concat upstream "/" .base.ref)
- .base.ref)))
- (magit-set (number-to-string .number) "branch" branch "pullRequest")
- (magit-set .title "branch" branch "description")
- (magit-refresh)
- branch)))
-
-(defun magit-checkout-pull-request (pr)
- "Create, configure and checkout a new branch from a pull-request.
-Please see the manual for more information."
- (interactive (list (magit-read-pull-request "Checkout pull request")))
- (magit-checkout
- (let ((inhibit-magit-refresh t))
- (magit-branch-pull-request pr))))
-
(defun magit-branch-read-args (prompt)
(let ((args (magit-branch-arguments)))
(if magit-branch-read-upstream-first
diff --git a/lisp/magit-collab.el b/lisp/magit-collab.el
deleted file mode 100644
index a637c7a..0000000
--- a/lisp/magit-collab.el
+++ /dev/null
@@ -1,174 +0,0 @@
-;;; magit-collab.el --- collaboration tools -*- lexical-binding: t -*-
-
-;; Copyright (C) 2010-2018 The Magit Project Contributors
-;;
-;; You should have received a copy of the AUTHORS.md file which
-;; lists all contributors. If not, see http://magit.vc/authors.
-
-;; Author: Jonas Bernoulli <jonas@bernoul.li>
-;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
-
-;; Magit is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; Magit is distributed in the hope that it will be useful, but WITHOUT
-;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-;; License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with Magit. If not, see http://www.gnu.org/licenses.
-
-;;; Commentary:
-
-;; This library implements various collaboration tools. These tools
-;; are only early incarnation -- implementing collaboration tools is
-;; a top priority for future development.
-
-;; Currently these tools (including `magit-branch-pull-request', which
-;; is defined elsewhere) only support Github, but support for other
-;; Git forges as well as mailing list based collaboration is in
-;; planning.
-
-;;; Code:
-
-(require 'magit)
-(require 'ghub)
-
-;;; Variables
-
-(defvar magit-github-token-scopes '(repo)
- "The Github API scopes needed by Magit.
-
-`repo' is the only required scope. Without this scope none of
-Magit's features that use the API work. Instead of this scope
-you could use `public_repo' if you are only interested in public
-repositories.
-
-`repo' Grants read/write access to code, commit statuses,
- invitations, collaborators, adding team memberships, and
- deployment statuses for public and private repositories
- and organizations.
-
-`public_repo' Grants read/write access to code, commit statuses,
- collaborators, and deployment statuses for public repositories
- and organizations. Also required for starring public
- repositories.")
-
-;;; Commands
-
-;;;###autoload
-(defun magit-browse-pull-request (pr)
- "Visit pull-request PR using `browse-url'.
-
-Currently this only supports Github, but that restriction will
-be lifted eventually to support other Git forges."
- (interactive (list (magit-read-pull-request "Visit pull request")))
- (browse-url (format "https://github.com/%s/pull/%s"
- (--> pr
- (cdr (assq 'base it))
- (cdr (assq 'repo it))
- (cdr (assq 'full_name it)))
- (cdr (assq 'number pr)))))
-
-;;; Utilities
-
-(defun magit-read-pull-request (prompt)
- "Read a pull request from the user, prompting with PROMPT.
-Return the Git forge's API response. Currently this function
-only supports Github, but that will change eventually."
- (let* ((origin (magit-upstream-repository))
- (id (magit--forge-id origin))
- (fmtfun (lambda (pull-request)
- (format "%s %s"
- (cdr (assq 'number pull-request))
- (cdr (assq 'title pull-request)))))
- (prs (ghub-get (format "/repos/%s/pulls" id) nil :auth 'magit))
- (choice (magit-completing-read
- prompt (mapcar fmtfun prs) nil nil nil nil
- (let ((default (thing-at-point 'github-pull-request)))
- (and default (funcall fmtfun default)))))
- (number (and (string-match "\\([0-9]+\\)" choice)
- (string-to-number (match-string 1 choice)))))
- (and number
- ;; Don't reuse the pr from the list, it lacks some information
- ;; that is only returned when requesting a single pr. #3371
- (ghub-get (format "/repos/%s/pulls/%s" id number)
- nil :auth 'magit))))
-
-(defun magit-upstream-repository ()
- "Return the remote name of the upstream repository.
-
-If the Git variable `magit.upstream' is set, then return its
-value. Otherwise return \"origin\". If the remote does not
-exist, then raise an error."
- (let ((remote (or (magit-get "magit.upstream") "origin")))
- (unless (magit-remote-p remote)
- (error "No remote named `%s' exists (consider setting `magit.upstream')"
- remote))
- (unless (magit--github-remote-p remote)
- (error "Currently only Github is supported"))
- remote))
-
-(defun magit--forge-id (remote)
- (let ((url (magit-get "remote" remote "url")))
- (and (string-match "\\([^:/]+/[^/]+?\\)\\(?:\\.git\\)?\\'" url)
- (match-string 1 url))))
-
-(defconst magit--github-url-regexp "\
-\\`\\(?:git://\\|git@\\|ssh://git@\\|https://\\)\
-\\(.*?\\)[/:]\
-\\(\\([^:/]+\\)/\\([^/]+?\\)\\)\
-\\(?:\\.git\\)?\\'")
-
-(defun magit--github-url-p (url)
- (save-match-data
- (and url
- (string-match magit--github-url-regexp url)
- (let ((host (match-string 1 url)))
- ;; Match values like "github.com-as-someone", which are
- ;; translated to just "github.com" according to settings
- ;; in "~/.ssh/config". Theoretically this could result
- ;; in false-positives, but that's rather unlikely. #3392
- (and (or (string-match-p (regexp-quote "github.com") host)
- (string-match-p
- (regexp-quote (car (split-string (ghub--host) "/")))
- host))
- host)))))
-
-(defun magit--github-remote-p (remote)
- (or (--when-let (magit-git-string "remote" "get-url" "--push" remote)
- (magit--github-url-p it))
- (--when-let (magit-git-string "remote" "get-url" "--all" remote)
- (magit--github-url-p it))))
-
-(defun magit--github-url-equal (r1 r2)
- (or (equal r1 r2)
- (save-match-data
- (let ((n1 (and (string-match magit--github-url-regexp r1)
- (match-string 2 r1)))
- (n2 (and (string-match magit--github-url-regexp r2)
- (match-string 2 r2))))
- (and n1 n2 (equal n1 n2))))))
-
-(defun magit--pullreq-from-upstream-p (pr)
- (let-alist pr
- (equal .head.repo.full_name
- .base.repo.full_name)))
-
-(defun magit--pullreq-branch (pr &optional assert-new)
- (let-alist pr
- (let ((branch .head.ref))
- (when (and (not (magit--pullreq-from-upstream-p pr))
- (or (not .maintainer_can_modify)
- (magit-branch-p branch)))
- (setq branch (format "pr-%s" .number)))
- (when (and assert-new (magit-branch-p branch))
- (user-error "Branch `%s' already exists" branch))
- branch)))
-
-;;; _
-(provide 'magit-collab)
-;;; magit-collab.el ends here
diff --git a/lisp/magit-merge.el b/lisp/magit-merge.el
index f06b1dc..3872dda 100644
--- a/lisp/magit-merge.el
+++ b/lisp/magit-merge.el
@@ -106,7 +106,7 @@ Before merging, force push the source branch to its push-remote,
provided the respective remote branch already exists, ensuring
that the respective pull-request (if any) won't get stuck on some
obsolete version of the commits that are being merged. Finally
-if `magit-branch-pull-request' was used to create the merged
+if `forge-branch-pullreq' was used to create the merged branch,
branch, then also remove the respective remote branch."
(interactive
(list (magit-read-other-local-branch
@@ -128,8 +128,8 @@ Before merging, force push the source branch to its push-remote,
provided the respective remote branch already exists, ensuring
that the respective pull-request (if any) won't get stuck on some
obsolete version of the commits that are being merged. Finally
-if `magit-branch-pull-request' was used to create the merged
-branch, then also remove the respective remote branch."
+if `forge-branch-pullreq' was used to create the merged branch,
+then also remove the respective remote branch."
(interactive (list (magit-read-other-local-branch "Absorb branch")
(magit-merge-arguments)))
(magit--merge-absort branch args))
diff --git a/lisp/magit-pkg.el b/lisp/magit-pkg.el
index 7ce25c8..fd44507 100644
--- a/lisp/magit-pkg.el
+++ b/lisp/magit-pkg.el
@@ -3,7 +3,6 @@
'((emacs "25.1")
(async "20180527")
(dash "20180910")
- (ghub "20181107")
(git-commit "20181104")
(magit-popup "20181003")
(with-editor "20181103")))
diff --git a/lisp/magit-utils.el b/lisp/magit-utils.el
index 2c7ebcd..a0444ab 100644
--- a/lisp/magit-utils.el
+++ b/lisp/magit-utils.el
@@ -743,12 +743,9 @@ See info node `(magit)Debugging Tools' for more information."
(error "Cannot find mandatory dependency %s" lib)))))
'(;; Like `LOAD_PATH' in `default.mk'.
"dash"
- "ghub"
- "graphql"
"lv"
"magit-popup"
"transient"
- "treepy"
"with-editor"
;; Obviously `magit' itself is needed too.
"magit"
diff --git a/lisp/magit-worktree.el b/lisp/magit-worktree.el
index e32f59d..716b3ad 100644
--- a/lisp/magit-worktree.el
+++ b/lisp/magit-worktree.el
@@ -35,11 +35,8 @@
(magit-define-popup magit-worktree-popup
"Popup console for worktree commands."
:man-page "git-worktree"
- :actions `((?b "Create new worktree" magit-worktree-checkout)
+ :actions '((?b "Create new worktree" magit-worktree-checkout)
(?c "Create new branch and worktree" magit-worktree-branch)
- ,@(and (not (require (quote forge) nil t))
- '((?p "Create new worktree from pull-request"
- magit-worktree-checkout-pull-request)))
(?k "Delete worktree" magit-worktree-delete)
(?g "Show status for worktree" magit-worktree-status))
:max-action-columns 1)
@@ -54,35 +51,6 @@
(magit-run-git "worktree" "add" (expand-file-name path) branch)
(magit-diff-visit-directory path))
-(defun magit-worktree-checkout-pull-request (path pr)
- "Create, configure and checkout a new worktree from a pull-request.
-This is like `magit-checkout-pull-request', except that it
-also creates a new worktree. Please see the manual for more
-information."
- (interactive
- (let ((pr (magit-read-pull-request "Checkout pull request")))
- (let-alist pr
- (let ((path (let ((branch (magit--pullreq-branch pr t)))
- (read-directory-name
- (format "Checkout #%s as `%s' in new worktree: "
- .number branch)
- (file-name-directory
- (directory-file-name default-directory))
- nil nil
- (if (string-match-p "\\`pr-[0-9]+\\'" branch)
- (number-to-string .number)
- (format "%s-%s" .number .head.ref))))))
- (when (equal path "")
- (user-error "The empty string isn't a valid path"))
- (list path pr)))))
- (when (and (file-exists-p path)
- (not (and (file-directory-p path)
- (= (length (directory-files "/tmp/testing/")) 2))))
- (user-error "%s already exists and isn't empty" path))
- (magit-worktree-checkout path
- (let ((inhibit-magit-refresh t))
- (magit-branch-pull-request pr))))
-
;;;###autoload
(defun magit-worktree-branch (path branch start-point &optional force)
"Create a new BRANCH and check it out in a new worktree at PATH."
diff --git a/lisp/magit.el b/lisp/magit.el
index 5bd9146..477b37c 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -591,7 +591,6 @@ For X11 something like ~/.xinitrc should work.\n"
(require 'magit-status)
(require 'magit-refs)
(require 'magit-files)
- (require 'magit-collab)
(require 'magit-reset)
(require 'magit-branch)
(require 'magit-merge)