| Age | Commit message (Collapse) | Author |
|
|
|
Re #2030.
|
|
Fixes #2673.
|
|
|
|
Ultimately all sections are inserted using `magit-insert-section',
which binds a few variables dynamically, to pass information to nested
invocations, among other things so that those invocations know what to
use as the parent section of the section that they are inserting.
Normally I avoid the use of dynamic bindings to pass around information,
but in this case it seems appropriate, because the "nested"
`magit-insert-section' invocations often cannot be found lexically
inside the outer invocation, and the cost of passing these values around
as arguments would therefore be very high; a great many functions (which
shouldn't have to concern themselves with this particular implementation
detail) would need additional arguments.
Also the current approach works quite well, because normally the process
of inserting a section and its subsections is fully completed before
other, unrelated sections are inserted into another buffer.
However there is an exception which wasn't handled properly. While
inserting sections in some buffer, it can become necessary to insert a
section into the process buffer. This would for example be the case if
`magit-git-debug' is set to `t', and some section inserter runs git to
get a value but gets a non-zero exit status instead. That normally is
not an error from Magit's perspective, but when `magit-git-debug' is
non-nil, then the error message is logged to the process buffer anyway.
In cases like this, outer bindings for `magit-section-insert--parent'
and `magit-section-insert--oldroot' are still in effect but we failed to
determine whether they are valid, which they are not because they are
about another section being inserted into another buffer.
Because process buffers are never refreshed (the refresh commands just
silently forgo doing so), this can be fixed easily, by binding these
variables to the appropriate values (`nil' or the buffer-local value of
`magit-root-section') around all calls to `magit-insert-section' which
insert a section into the process buffer.
We do not have to do the same for `magit-insert-section--current'
because the value is not used by `magit-insert-section'. This variable
might be used in the BODY of the macro, but by the time that happens the
macro has already bound the variable to the correct value, overriding
and ignoring all bindings that might be in effect outside of the BODY.
Fixes #2669.
|
|
Specifically, about `magit-auto-revert-mode' replacing
`magit-revert-buffers'.
Close #2665.
|
|
Closes #2655.
|
|
This function is an alternative to
magit-display-buffer-fullframe-status-v1 that makes Magit buffers pop up
on the same side as they would with magit-display-buffer-traditional.
Do this by calling display-buffer-pop-up-window call and then swapping
the windows. This will work best with magit-bury-buffer-function set to
its default value of magit-restore-window-configuration, but a few
window parameters are adjusted so that magit-mode-quit-window and
quit-window behave sensibly.
Another approach would be to make a variant of
display-buffer-pop-up-window that pops up on the desired side. However,
doing this would require either relying on several internal window.el
functions or re-implementing these functions. A third approach would be
to define a display-buffer-above-selected analog of
display-buffer-below-selected, but this has the same problem as the
second approach and also deviates from
magit-display-buffer-traditional's behavior in that it hardcodes a
horizontal split rather than respecting split-window-preferred-function.
Re: #2656
|
|
- Use relative or abbreviated absolute names, whichever is shorter.
- Align the filename column
- Drop the "(detached)" case, since it was never hit. A detached
worktree is identified by having a commit instead of a branch.
Close #2658
|
|
As mentioned in #2541, there are a lot of possible behaviors for
display-buffer functions. Provide a few more options that users can try
before resorting to writing their own functions.
magit-display-buffer-same-window-except-diff-v1 and
magit-display-buffer-fullcolumn-most-v1 are modified from variants
proposed in #2541. magit-display-buffer-fullframe-status-v1 provides
the full-frame status behavior that seems to be popular (#1953).
The names of these functions are versioned, as suggested in #2541.
The helper function magit--display-buffer-fullframe is modified from a
function that Sebastian Wiesner shared in #1953.
|
|
|
|
|
|
If we let `display-buffer' (called by `describe-function') decide where
to put the *Help* window, it may (if the frame is wide enough) decide to
split horizontally instead of using the window we were creating earlier
with `split-window-below'. This results in 3 windows, 2 of which are
the popup buffer, and is generally not very helpful.
To avoid this, let-bind `display-buffer-alist' to tell `display-buffer'
that it should reuse the window we made.
|
|
|
|
Since switching to magit-stash-show from magit-diff-stash in [1], the
stash buffer's mode and refresh args are `magit-stash-mode' and
stash@{N}, respectively.
Fixes #2654.
[1]: "magit-stash-show: new command" 2014-10-05
bbb08e29498de4fe0e69a8871fbaecb62203c077
|
|
|
|
|
|
|
|
This allows intercepting password prompts, and is also nicer if the
clone happens to take a long time.
|
|
|
|
Also add new option `magit-diff-buffer-file-locked'.
|
|
|
|
|
|
When applying changes to files in the working tree results in conflicts,
then `git apply' aborts and does not apply anything. What we would like
it to do, is to perform a 3-way merge, just like when applying changes
to the index, but unfortunately that is not possible.
When reversing changes and when discarding staged changes while there
are unstaged changes, then use `--reject'. This won't insert conflict
markers into files in the working tree, but it ensures that changes that
can be applied are applied even when there are other changes that cannot.
For changes that could not be applied `--reject' causes the creation of
diff files which contain those changes. We would have liked for Git to
create conflict markers - using such "conflict files" is the closest we
can get to that.
|
|
|
|
|
|
Also add the utility function `magit-read-worktree'.
|
|
Also add the utility function `magit-list-worktrees'.
|
|
|
|
Re #2602.
|
|
|
|
|
|
Re: #2634
|
|
|
|
|
|
|
|
If one adds a submodule and then (potentially accidentally) unstaged the
submodule again, then the changes to .gitsubmodules persist. When later
re-adding the repository `magit-submodule-add' now offers the already
configure submodule name as default choice.
|
|
Instead of using `read-file-name', which allows selecting a path which
is not a repository, use `magit-completing-read' to select the relative
name of a known repository located inside the outer repository.
This also fixes a second issue: Previously an absolute path may have
been used as initial input. If the user used that and the chosen
repository was not located at the top-level of the outer repository,
then `read-file-name' considered that an invalid choice and prompted
again, this time without a default.
|
|
Show the recent commits if the upstream is not configured.
A faulty test used to prevent that.
|
|
Previously it was possible for the commit process to still hold the lock
on index.lock, when the rebase process was trying to acquire it. Now we
run the commit process synchronously if we are going to also rebase, and
we also forgo refreshing between the two processes. If we don't rebase,
then still commit asynchronously and refresh.
|
|
|
|
Instead of hardcoding "git" as the executable. This lets the default
value for magit-cygwin-mount-points correspond to the user's choice for
magit-git-executable.
|
|
f06edb2 (magit-log-{popup,buffer-file}: add ā-Lā argument, 2015-09-30)
stripped the first two characters of the file name to account for
--no-prefix not working with when -L is used with git log. However,
magit-diff-wash-diff is also called in log mode when --patch is used
without --graph, and in this case --no-prefix has an effect, so the file
name gets truncated. Check that -L is in magit-refresh-args to avoid
this.
Fixes #2622.
|
|
Use `--no-ff' even if it is not specified in the popup. Otherwise Git
would to a fast-forward merge if possible, which clearly isn't what one
would expect to happen. The intention is to create a merge commit, but
have the opportunity to change the commit message before creating that
commit. To not create the commit but still perform (and finish) the
merge, is something very different.
Fixes #2620.
|
|
Use `--no-ff' even if it is not specified in the popup. Otherwise Git
would to a fast-forward merge if possible, which clearly isn't what one
would expect to happen. The intention is to create a merge commit, but
have the opportunity to inspect the merge before creating that commit.
To not create the commit but still perform (and finish) the merge, is
something very different.
Fixes #2620.
|
|
|
|
|
|
|
|
|
|
* Start diff highlighting at beginning of diff line rather than after
"diff --git".
* Highlight last change.
Fixes #2616.
|