[Top][All Lists]

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

Re: git-handler.el

From: Yuri Khan
Subject: Re: git-handler.el
Date: Sun, 13 Aug 2017 17:08:35 +0700

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.

> 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. 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.)

(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.

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

>> Also, in a dired buffer showing src/emacs/lisp@@/ef7a18a071, will
>> dired-jump jump to src/emacs@@/ef7a18a071?
> Could be, yes. Likely, it needs some adaption of dired-jump (it uses
> file-name-directory for traversing the directory path), but why not.

reply via email to

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