| Age | Commit message (Collapse) | Author |
|
|
|
Because file notifications may arrive with a delay, this option now
defaults to `t' even when notifications can be used,
|
|
|
|
|
|
|
|
|
|
Before `git log' is called, `++order=TYPE' is converted to
`--TYPE-order', one of `--topo-order', `--date-order', and
`--author-date-order'. We do that instead of adding the
individual arguments to the popup because they are mutually
exclusive.
|
|
|
|
Fixes #2528.
|
|
|
|
|
|
Add new command `magit-reverse-in-index' but do not bind any key to it.
Instead make `magit-unstage' call it when the user attempts to unstage
a committed change. Setting the new option `magit-unstage-committed'
to `nil' disables this behavior.
|
|
Add new option `auto-revert-buffer-list-filter' and adjust
`auto-revert-buffers' to use it. Add new predicates
`magit-auto-revert-buffer-p' and the more restrictive
`magit-auto-revert-repository-buffer-p', which are both
intended to be used as potential value of the option.
For now the option defaults to `nil', but that might change in a future
release. When Magit explicitly calls `auto-revert-buffers' (as opposed
to when that is called due to a file notification event or by a timer),
and `auto-revert-buffer-list-filter' is `nil', then it is let-bound to
`magit-auto-revert-repository-buffer-p'.
Users who use Tramp and experience delays, should consider setting
the option to `magit-auto-revert-repository-buffer-p'.
|
|
|
|
|
|
Actually, since `git clone' always creates that symbolic-ref,
automatically *remove* that symbolic-ref right after cloning.
The default is to remove that symbolic-ref because it isn't actually
very useful. Right after running `git clone' one knows which of the
remote branches is the "remote HEAD" without having to rely on that
symbolic-ref, because the local branch is automatically setup to use
that as upstream. At all other times that symbolic-ref is unreliable
because it is not automatically updated then the "remote HEAD" changes.
But some users might want it anyway, so add a new option
`magit-clone-set-remote-head', which can be set to `t' to preserve the
symbolic-ref.
|
|
|
|
Resetting a branch to another branch, causes the former to be configured
as the upstream of the latter. That behavior was introduced by accident
when the argument `--track' was replaced with the variable
`branch.autoSetupMerge' in the popup. Because it would be undesirable
to restore the `--track' argument in the popup, one now has to use a
prefix argument to set the upstream while resetting.
Re #2517.
|
|
Fixes #2517.
|
|
If `uniquify-buffer-name-style' is `nil', then let-bind it
to `post-forward-angle-brackets', like we already do when
the global value is `forward'.
Fixes #2516.
|
|
By default Git only maintains reflogs for refs in certain namespaces.
To force it do so for other refs it was necessary to manually create the
appropriate file .git/logs/<ref> before calling `git update-ref'. Since
v2.6.0 that command supports the `--create-reflog' argument, and we now
use it if available.
To make that easier, wrap `git update-ref' in the new function
`magit-update-ref', which also falls back to the old approach for older
Git versions. Also remove the function `magit-reflog-enable', which is
where the hack used to be located.
This also fixes #2515. The old hack failed when creating a stash in a
linked working tree when the repository did not already contain another
stash. The problem was that a file .git/worktrees/<worktree>/logs/<ref>
was created, instead of .git/logs/<ref>. Like the `--create-reflog'
argument, support for linked working trees was added in Git v2.6.0, so
it's okay to use the old "touch file" approach for older Git versions
(not that we have a choice anyway).
|
|
For log and reflog buffers the margin was previously reset to the
default state according to `magit-{log or reflog}-show-margin', when a
command was invoked which changed what log/reflog is being displayed.
|
|
|
|
Change the section heading inserted by
`magit-insert-unpushed-to-upstream' from "Unpushed to <upstream>" to
"Unmerged into <upstream>" because one should merge into the upstream
instead of pushing to it.
|
|
|
|
|
|
|
|
|
|
Also add ARG argument to `magit-abbrev-arg'.
|
|
|
|
Unlike `concat', `insert' fails if one of its arguments is `nil'.
|
|
|
|
|
|
|
|
|
|
If `magit-status-always-refresh' is t (the default) then now also
refresh the status buffer if the current buffer isn't a Magit buffer.
Otherwise, if it is nil, then only refresh it if it itself is the
current buffer.
|
|
Replace the old magit-specific auto-revert implementation with the
mode `magit-auto-revert-mode', a globalized variant of the built-in
`auto-revert-mode'. By default Magit still explicitly triggers the
reverts after running git for side-effects. Automatic reverts are
still enabled by default, and Magit is less verbose about it. The
behavior can be tuned using `magit-auto-revert-' and `auto-revert-'
options.
The main benefit of this change is that this implementation caches
whether a file is tracked or not. The old implementation determined
this on every revert cycle, which did not perform well when there
were many open buffers and/or many tracked files.
|
|
Display popups using `display-buffer' with the value of the new
option `magit-popup-display-buffer-action' as ACTION argument.
|
|
Depending on the number of tracked files, the number of buffers, and
whether Tramp is used, testing whether the files in question actually
are tracked can reduce performance drastically. So we now default to
reverting all files inside the current repository.
Setting `magit-revert-buffers-only-for-tracked-files' to t restores
the old behavior.
|
|
|
|
But do not add it to the push popup by default.
|
|
This command was removed earlier, but it turned out that it is still
required for certain work-flows. Restore the command, but do not add it
to the push popup again. If the user follows the instructions on how to
add the command to the popup, then that now shows what the command will
do.
|
|
|
|
|
|
Combine `magit-pull-popup' and `magit-fetch-popup' into one common
popup. By default the old popups are still bound in `magit-mode-map'.
Add this to your init file to use the new popup:
(with-eval-after-load 'magit-remote
(define-key magit-mode-map "f" 'magit-pull-and-fetch-popup)
(define-key magit-mode-map "F" nil))
One advantage of the new popup is that it is once more possible to
press the same key twice to fetch. However that binding now is "f f",
not "F F", and it fetches all remotes not just the current remote.
The new popup also lacks the commands for fetching from only a single
remote. You can add them to the new popup by adding something like this
to your init file:
(with-eval-after-load 'magit-remote
(magit-define-popup-action 'magit-pull-and-fetch-popup ?U
'magit-get-upstream-branch
'magit-fetch-from-upstream-remote ?F)
(magit-define-popup-action 'magit-pull-and-fetch-popup ?P
'magit-get-push-branch
'magit-fetch-from-push-remote ?F))
|
|
|
|
|
|
|
|
|
|
It turned out that this is not actually necessary but has downsides.
Users should instead set `remote.pushDefault' once per repository.
Doing so has the advantage that this variable affects all branches,
including branches that already exist. `branch.autoSetupPush' on the
other hand only takes effect when new branches are being created.
Furthermore needlessly setting a variable per-branch (using
`branch.<name>.pushRemote') which could just as well be set per
repository (because it is the same for all branches) has the
disadvantage that changing that value becomes much more work.
In rare cases the push-remote of a branch might be different from that
of the other branches. In that case `branch.<unicorn>.pushRemote'
should be set manually. Whether `branch.autoSetupPush' exists or not,
doesn't matter, if the unicorn needs a different push-remote, then
`branch.<unicorn>.pushRemote' always has to be set explicitly.
|