removals #1239

Merged
merged 7 commits into from Feb 22, 2014

Conversation

Projects
None yet
1 participant
@tarsius
Owner

tarsius commented Feb 22, 2014

Also see #1220.

tarsius added some commits Feb 22, 2014

temporarily remove ediff support, except resolve
Remove this implementation of Ediff support in Magit, to make it easier
to write a new more consistent and less "if cursor is where it is then
I am just gonna raise an error"ish implementation.

Keep `magit-interactive-resolve' because that is the most useful and
most often used part of the old Ediff support, and it also happens to
be the least problematic part.  It is less problematic than the rest
because it doesn't depend unrelated code to prepare data on its behalf
like the rest does.
magit-show: temporarily loose ability to guess rev from current diff
That feature and more will be restored later.  It's a chicken and egg
problem: if I don't remove this incomplete implementation then I don't
know how I should ever arrive at a better one.  So it has to get worse
before it can get better.
magit-read-rev-range: remove function
While Magit needs good "range completion", what this
function provides, cannot possibly contribute to that.
no longer store current diff range in sections
The "diff range" of each diff can be unambiguously determined when the
information is actually required.  For diff buffers the range can be
extracted from the buffer-local `magit-refresh-args' and for diffs in
the status buffer (staged and unstaged) the "section context" can be
used to do so.

So we shouldn't store that information in each hunk section before it
is even required.  Also we shouldn't loose information in the process.

This commit removes the code that did store the information but does not
replace it with code to get the same (well better) information when it
is actually required.  That isn't necessary yet, because Ediff the only
feature which actually made use of the static information has been
removed in the previous two commits.

Dynamically determining the diff range will be implemented when Ediff
support is being reimplemented.
remove magit specific "rewrite" functionality
Please consider the following and also read issue #966.

(1) I think that by removing this feature, I do its users a service.
    Sure they will have to find an alternative in `cherry-pick' and
    `rebase --interactive', but once they have learned about these
    tools, they will be using vastly superior tools.

(2) For now this patch only lives on the `next' branch and I have
    already stated that, in the case I fail to convince everyone of
    the above, I will make the rewrite functionality available as
    a separate package.
remove broken magit-change-what-branch-tracks
Currently Magit does not provide a sane way of settings a branch's
upstream branch.  This command kind of served this purpose but it
is rather bad, e.g. it assumes we only ever want to track a remote
branch.  Nuke it to make room for something less crappy.
remove magit specific "pretty refs" functionality
Git knows short human friendly names for refs like local branches,
remote branches and tags.  Until now Magit supported an additional,
incompatible representation, which had to be converted back and forth
and made refactoring related things impossible.  This commit removes
it, and I think that is no loss at all.

The only benefit I can see in the Magit specific representation is that
it might make completing refs slightly easier, because the thing that
one often wants to complete against is at the beginning of the string.
However that is not always the case, sometimes the thing one wanted to
complete against would have been at the beginning, if Magit had not
interfered.

Using a completion algorithm or framework that supports non-prefix
completion serves this purpose better.  Magit, to some extend, already
supports using alternative completion frameworks.  This can be further
improved.

ref                        refname        "branch-then-remote"
--------------------------------------------------------------
refs/heads/master          master         master
refs/remote/origin/master  origin/master  master (origin)
refs/tags/v1.0             v1.0           v1.0 (tag)

This commit only removes the "branch-then-remote" format; it does not
yet remove all of the complications, inconsistencies and bugs, that
were, at least in part, the result of this unnecessary and counter-
productive feature.

@tarsius tarsius merged commit d2421a2 into next Feb 22, 2014

@tarsius tarsius deleted the n/removals branch Feb 22, 2014

@tarsius tarsius added this to the 2.1.0 milestone Feb 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment