[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git-handler.el

From: Michael Albinus
Subject: Re: git-handler.el
Date: Mon, 14 Aug 2017 18:40:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Yuri Khan <address@hidden> writes:

> On Sun, Aug 13, 2017 at 4:14 PM, Michael Albinus <address@hidden> wrote:
>>> As a Git user, I frequently want to
>>> browse the whole repository as of a specific revision. Use case: “Two
>>> months ago, function foo was changed to call function bar. How did bar
>>> look at that point?”
>> You know, that function bar is declared in file baz.el.
> Not necessarily. It is today, but two months ago it could have resided
> in any of baz.el, quux.el or xyzzy.el.

I fear this cannot be followed easily with file name handlers. As the
feature says, file name handlers work on file level, not on function
level. Even "git log -L :<function>:<file>" does not return results for
other files.

>> So you could
>> inspect the revisions of baz.el by looking into directory
>> "/home/albinus/src/emacs/lisp/baz.el@@/master" (given you're interested
>> in branch master).
> In the use case being discussed, I’m not interested in master.

You could always use another branch.

> Or, more specifically, not in its current position, and not in the
> whole set of its commits that modify baz.el. I am interested in one
> specific commit, say ef7a18a071, that does not modify
> baz.el. Presented by a list of commits modifying baz.el, I will
> literally be unable to find the revision I’m interested in. (No,
> making a note of the commit timestamp and bisecting the other commit
> list for that will not work.  In Git, chronological order is not
> guaranteed within a branch.)

So you could go to "/home/albinus/src/emacs@@/ef7a18a071", as said
somewhere else. You will see all files which have been changed by this

> (Because Emacs is all about custom and idiosyncratic workflows[1],
> here’s mine:
> * I never use find-file interactively except to create a new file or
> jump to a directory on a remote server (via Tramp).
> * I navigate from a file to its containing directory or from a
> directory to its parent using dired-jump, and from a directory to a
> file using dired-find-file.

I haven't played with this, but it might be possible to support this
workflow. And yes, such revisioned file names shall work also remotely,
for Tramp files.

> [1]: https://xkcd.com/1172/ )


I like this workflow there. Maybe we find a way to reenable it.

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]