Permalink
Commits on Jan 20, 2017
  1. Fixup release notes

    tarsius committed Jan 20, 2017
Commits on Jan 19, 2017
  1. magit-diff-show-or-scroll: also check hash when deciding what to do

    When the revision or stash buffer already showed the requested
    reference, but that reference no longer pointed at the same revision,
    then the buffer was scrolled instead of updated.  Now we save the
    revision hash and compare that too.
    
    Fixes #2966.
    tarsius committed Jan 19, 2017
  2. While committing, diff from inside gitdir if necessary

    If a repository is created using `git init --separate-git-dir', then
    that does not set `core.worktree' (unlike what `git submodule' does).
    
    When committing inside such a repository `magit-commit-diff' is run
    inside the gitdir, and there is no way to prevent that.  Luckily `git
    diff' also works inside the gitdir, but because many other commands
    don't, we always run everything in the working tree.
    
    This is fairly deeply ingrained, so we have to add a kludge to
    `magit-toplevel', that causes it to return the gitdir instead,
    and that is triggered by dynamically binding the new variable
    `magit-toplevel--force-fallback-to-gitdir' to a non-nil value.
    
    And `magit-commit-diff' now does so to fix #2955.
    tarsius committed Jan 17, 2017
  3. Update release notes

    kyleam committed Jan 19, 2017
  4. magit-log-wash-rev: don't choke on empty reflog messages

    When the current branch is renamed, the entry for this event in HEAD's
    reflog has an empty message [1].  The empty message causes issues for
    magit-log-reflog-re, which will match beyond the current line to find
    the "refsub".
    
    As an example, the raw output
    
        86904ee5^@Kyle Meyer^@HEAD@{1484792543 -0500}^@
        86904ee5^@Kyle Meyer^@HEAD@{1484791872 -0500}^@commit (amend): msg
        c17b5061^@Kyle Meyer^@HEAD@{1484791742 -0500}^@commit (amend): msg
    
    is washed to
    
        86904ee5 0
        86904ee5^@Kyle   msg
        86904ee5 1  amend            msg
        c17b5061 2  amend            msg
    
    instead of
    
        86904ee5 0
        86904ee5 1  amend            msg
        c17b5061 2  amend            msg
    
    To handle these lines, tighten magit-log-reflog-re so that it doesn't
    allow the refsub to match newlines, and teach magit-log-wash-rev to
    insert the reflog count even when refsub has a nil value.
    
    Although these mostly blank lines aren't very informative, it's
    probably worth retaining them in order to be consistent with the "git
    reflog" output and to avoid users being confused about why entries are
    missing.
    
    [1] I'm not sure if this is intentional.  I've asked the Git mailing
        list: https://public-inbox.org/git/87pojmwq5y.fsf@kyleam.com/
    kyleam committed Jan 18, 2017
Commits on Jan 14, 2017
  1. Stop using cl-defun to define certain magit-get-{*} functions

    The functions `magit-get-upstream-branch' and `magit-get-push-branch'
    recently gained a second optional argument VERIFY.  That is a problem
    because the default value of the existing first argument, BRANCH, was
    defined using `cl-defun's (VAR INITFORM) format.  The value of the
    INITFORM, which is (magit-get-current-branch), is only used when the
    VAR isn't provided by the caller at all.  If the VAR is provided, but
    `nil', then that provided value `nil' is used.
    
    Previously it wouldn't have made much sense to use (FN nil), but now
    it is reasonable to use (FN nil t) and expect the default to be used.
    But actually one had to write (FN (magit-get-current-branch) t) until
    before this commit.
    
    But that clearly is very cumbersome, and so we stop using `cl-defun'
    and instead, if necessary, determine the default value inside the body
    of the affected functions.
    
    For consistency, we do the same thing for `magit-get-upstream-ref',
    `magit-get-upstream-remote', and `magit-get-push-remote', even though
    these functions (currently) do not take a second optional argument.
    
    Fixes #2960.
    tarsius committed Jan 14, 2017
Commits on Jan 12, 2017
  1. magit-margin.el: fix commentary

    tarsius committed Jan 12, 2017
Commits on Jan 9, 2017
  1. git-commit-setup: Call 'normal-mode' with argument

    This fixes a regression introduced by commit
    084182e.
    
    According to the docstring (and the code) of 'normal-mode', when it is
    called without argument, 'enable-local-variables' is ignored, so if
    there are unsafe local variables, a user will be prompted about them
    every time.
    alezost committed Jan 9, 2017
Commits on Jan 7, 2017
Commits on Jan 6, 2017
  1. magit-split-range: fix handling of "..@{upstream}"

    When  diff'ing  against "unpulled  commits",  the  resulting range  is
    "..@{upstream}". magit-split-range  choked on that. With  this commit:
    
            (magit-split-range "..@{upstream}")
    
    Now yields:
    
            ("HEAD" . "@{upstream}")
    peniblec committed Jan 6, 2017
Commits on Jan 5, 2017
  1. Autoload ido-enter-magit-status

    alezost committed Jan 5, 2017
Commits on Jan 4, 2017
  1. Release version 2.10.0

    tarsius committed Jan 4, 2017
  2. Bump copyright years

    tarsius committed Jan 4, 2017
Commits on Dec 31, 2016
  1. Use magit-get instead of magit-git-string

    It's cached more aggressively.
    
    48/74
    npostavs committed with tarsius Dec 30, 2016
Commits on Dec 29, 2016
  1. magit-wip.el: cleanup footer

    Since 92e2e88 we use .dir-locals.el to set local variables
    and don't use ";;; LIBRARY.el ends soon" lines anymore.
    tarsius committed Dec 29, 2016
  2. magit-unstage-committed: fix doc-string

    Opening parenthesis at the beginning of the line have to be quoted.
    Not doing so at the very least confuses `outline-minor-mode'.
    tarsius committed Dec 29, 2016
Commits on Dec 28, 2016
  1. magit-repolist-column-dirty: fix 801cbfd

    Despite its name, magit-unstaged-files [1] lists both staged and
    unstaged changes because it's based on a "git diff-index HEAD" call.
    As a result, magit-repolist-column-dirty's last condition in 801cbfd
    is unreachable.  Use magit-modified-files instead, which is based on a
    "git diff-files" call and is restricted to files with unstaged
    changes.
    
    With the above issue fixed, the last condition can be reached, but the
    return value for this condition is wrong.  Correct the
    magit-staged-files call so that "S" is returned rather than passed as
    an argument to magit-staged-files.
    
    [1] magit-unstaged-files was added in 65867b5 (magit-unstaged-files:
        new function, 2015-12-15) and has never been used for anything
        until its use in magit-repolist-column-dirty.  I don't know how it
        was supposed to differ from magit-modified-files.
    kyleam committed Dec 28, 2016