From: Jonas Bernoulli <jonas@bernoul.li>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dgutov@yandex.ru, michael.albinus@gmx.de, emacs-devel@gnu.org
Subject: Re: git-handler.el
Date: Sat, 12 Aug 2017 19:26:15 +0200 [thread overview]
Message-ID: <87a834d7ew.fsf@bernoul.li> (raw)
In-Reply-To: <83y3qphu4s.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Jonas Bernoulli <jonas@bernoul.li>
>> Date: Sat, 12 Aug 2017 12:48:22 +0200
>> Cc: Emacs developers <emacs-devel@gnu.org>, Dmitry Gutov <dgutov@yandex.ru>
>>
>> > A revisioned filename is something like "/path/to/file@@revision".
>> > "revision" could be a revision like "81656add81", a branch like
>> > "scratch/kqueue", or a tag like "emacs-19.34". Of course, the syntax
>> > could be changed.
>>
>> I would prefer /path/to/repo/@git:REVISION:path/to/file. I don't have
>> a strong opinion about what the magic cookie should look like, but I
>> think it should be inserted at the root of the working tree.
>
> That doesn't scale to VCSes which keep separate versions for
> individual files.
How so? Wouldn't my scheme just look like:
/path/to/dir-containing-closest-control-file/<vcs>@<rev>:<file>
instead of
/path/to/dir-containing-closest-control-file/<vcs>@<file>/<rev>
when trying to stay as close the internals of that <vcs>?
Also isn't that an implementation detail and users of <vcs> still
think of "/path/to/top" as "the repository"? If that is so then
what should it matter that <vcs> spreads the history files across
the repository instead of putting them into a dedicated control
directory?
Using such a <vcs> and given:
/path/to/top/
|- fileA
|- .fileA.history
`- subdir/
|- fileB
`- .fileB.history
I don't know whether its users would prefer
A1) /path/to/top/<vcs>@<rev>:<subdir>/<fileB>
A2) /path/to/top/<vcs>@<subdir>/<fileB>/<rev>
or
B1) /path/to/top/subdir/<vcs>@<rev>:<fileB>
B2) /path/to/top/subdir/<vcs>@<fileB>/<rev>
But even if to users of <vcs> (B) is preferable to (A), I don't see
how (B2) is superior to (B1), or how (B1) is even incompatible.
But I never used such a vcs, so probably I am missing something.
> Michael's scheme does support such VCSes. For a
> VCS like Git or Bazaar, Michael's scheme shouldn't get in the way, I
> think.
Maybe we could use different schemes for different vc systems.
> If you disagree, please show some use cases where this could
> cause trouble.
I care more about the conceptual consistency than use cases at this
point, because I think that even if we cannot think of any concrete
issues now, we are sure to eventually run into.
The revision is part of a virtual directory structure and it should
appear in the correct (i.e. hierarchic) place. People have come to
expect a hierarchic structure when dealing with files, and if we break
that consistency (just for compatibility with legacy vc systems), then
that will cause confusion.
This is one way of accessing <blob> as stored in <branch>:
cd /tmp/repo
git worktree add ../repo_<branch> <branch>
find-file /tmp/repo_<branch>/<blob>
And with a file handler instead of a worktree checkout:
cd /tmp/repo
find-file /tmp/repo/git@<branch>:<blob>
or
find-file /tmp/repo/@@<blob>/<branch
Clearly only the scheme I suggested is consistent with the expectation
of a hierarchic directory structure.
One example use case where the scheme that I propose would be nicer than
the non-hierarchic one is "using find-file to open another blob from the
same revision/tree".
next prev parent reply other threads:[~2017-08-12 17:26 UTC|newest]
Thread overview: 136+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 15:29 In support of Jonas Bernoulli's Magit (was: comparing code on different branches) John Yates
2017-07-05 16:15 ` Kaushal Modi
2017-07-05 16:22 ` In support of Jonas Bernoulli's Magit Óscar Fuentes
2017-07-05 16:27 ` Kaushal Modi
2017-07-05 16:38 ` Stefan Monnier
2017-07-05 18:15 ` Óscar Fuentes
2017-07-05 23:03 ` Richard Stallman
2017-07-06 0:24 ` Clément Pit-Claudel
2017-07-06 1:46 ` Glenn Morris
2017-07-06 2:17 ` Clément Pit-Claudel
2017-07-10 9:26 ` Richard Stallman
2017-07-06 2:29 ` Jean-Christophe Helary
2017-07-14 14:34 ` Philippe Vaucher
2017-07-16 1:51 ` Richard Stallman
2017-07-06 1:50 ` Glenn Morris
2017-07-06 14:12 ` Ted Zlatanov
2017-07-06 14:47 ` Kaushal Modi
2017-07-06 17:11 ` Óscar Fuentes
2017-07-06 16:02 ` Richard Stallman
2017-07-06 16:52 ` Ken Manheimer
2017-07-07 18:23 ` Richard Stallman
2017-07-07 18:49 ` Stefan Monnier
2017-07-07 22:08 ` Phillip Lord
2017-07-07 22:22 ` Stefan Monnier
2017-07-08 6:58 ` Eli Zaretskii
2017-07-08 6:57 ` Eli Zaretskii
2017-07-08 9:05 ` Phillip Lord
2017-07-08 10:20 ` Eli Zaretskii
2017-07-08 20:34 ` Phillip Lord
2017-07-09 2:33 ` Eli Zaretskii
2017-07-10 9:28 ` Richard Stallman
2017-07-10 13:15 ` Phillip Lord
2017-07-11 11:45 ` Richard Stallman
2017-07-08 17:04 ` Richard Stallman
2017-07-08 20:52 ` Phillip Lord
2017-07-10 9:30 ` Richard Stallman
2017-07-08 17:02 ` Richard Stallman
2017-07-10 9:26 ` Richard Stallman
2017-07-10 12:47 ` Phillip Lord
2017-07-10 23:26 ` Richard Stallman
2017-07-11 9:40 ` Phillip Lord
2017-07-11 22:56 ` Richard Stallman
2017-07-10 23:27 ` Richard Stallman
2017-07-10 16:31 ` Marcin Borkowski
2017-07-10 23:30 ` Richard Stallman
2017-07-11 4:20 ` Marcin Borkowski
2017-07-11 11:48 ` Richard Stallman
2017-07-06 23:01 ` Dmitry Gutov
2017-07-07 18:27 ` Richard Stallman
2017-07-07 18:52 ` Stefan Monnier
2017-07-08 17:01 ` Richard Stallman
2017-07-08 17:42 ` raman
2017-07-08 18:58 ` Eli Zaretskii
2017-07-08 20:57 ` Phillip Lord
2017-07-08 22:57 ` John Yates
2017-07-09 0:04 ` raman
2017-07-09 9:25 ` Marcin Borkowski
2017-07-09 14:19 ` Eli Zaretskii
2017-07-10 1:01 ` In defense of VC [was: In support of Jonas Bernoulli's Magit] Juliusz Chroboczek
2017-07-10 7:09 ` Michael Albinus
2017-07-10 8:34 ` Lars Ingebrigtsen
2017-07-10 8:47 ` Juliusz Chroboczek
2017-07-10 8:59 ` Yuri Khan
2017-07-10 16:28 ` Marcin Borkowski
2017-07-10 17:12 ` Eli Zaretskii
2017-07-16 18:01 ` Dmitry Gutov
2017-07-16 19:09 ` Marcin Borkowski
2017-07-16 19:17 ` Dmitry Gutov
2017-07-10 23:26 ` Richard Stallman
2017-07-11 4:15 ` Marcin Borkowski
2017-07-11 11:48 ` Richard Stallman
2017-07-11 14:10 ` Marcin Borkowski
2017-07-11 14:27 ` Juliusz Chroboczek
2017-07-11 22:56 ` Richard Stallman
2017-07-11 14:37 ` Eli Zaretskii
2017-07-11 16:03 ` Dmitry Gutov
2017-07-11 7:10 ` Andreas Schwab
2017-07-11 7:26 ` Michael Albinus
2017-07-11 22:55 ` Richard Stallman
2017-07-10 9:29 ` In support of Jonas Bernoulli's Magit Richard Stallman
2017-07-10 16:32 ` Marcin Borkowski
2017-07-10 23:30 ` Richard Stallman
2017-07-11 4:14 ` Marcin Borkowski
2017-07-06 15:24 ` Phillip Lord
2017-07-10 9:26 ` Richard Stallman
2017-07-10 13:09 ` Phillip Lord
2017-07-11 11:45 ` Richard Stallman
2017-07-05 16:29 ` Stefan Monnier
2017-07-05 18:37 ` Ingo Lohmar
2017-07-05 18:14 ` In support of Jonas Bernoulli's Magit (was: comparing code on different branches) Noam Postavsky
2017-07-06 5:06 ` Paul Michael Reilly
2017-07-06 8:46 ` In support of Jonas Bernoulli's Magit Toon Claes
2017-07-07 1:38 ` Mike Gerwitz
2017-07-07 8:16 ` Trying out GitLab (was Re: In support of Jonas Bernoulli's Magit) Nicolas Petton
2017-07-07 8:27 ` Tino Calancha
2017-07-07 8:29 ` Nicolas Petton
2017-07-07 12:08 ` Ted Zlatanov
2017-07-08 11:02 ` Ævar Arnfjörð Bjarmason
2017-07-08 11:13 ` Dmitry Gutov
2017-07-08 11:53 ` Eli Zaretskii
2017-07-08 12:04 ` Dmitry Gutov
2017-07-08 21:02 ` Phillip Lord
2017-07-08 23:19 ` Tim Cross
2017-07-08 12:43 ` Ævar Arnfjörð Bjarmason
2017-07-08 12:54 ` Eli Zaretskii
2017-07-08 11:29 ` Jean-Christophe Helary
2017-07-07 16:55 ` Mike Gerwitz
2017-07-07 18:23 ` In support of Jonas Bernoulli's Magit Richard Stallman
2017-07-07 18:23 ` In support of Jonas Bernoulli's Magit (was: comparing code on different branches) Richard Stallman
2017-07-13 16:13 ` Jonas Bernoulli
2017-07-14 1:20 ` Richard Stallman
2017-07-14 18:24 ` Jonas Bernoulli
2017-07-14 3:31 ` In support of Jonas Bernoulli's Magit Stefan Monnier
2017-07-14 18:09 ` Jonas Bernoulli
2017-07-14 7:14 ` git-handler.el (was: In support of Jonas Bernoulli's Magit) Michael Albinus
2017-07-14 17:57 ` Jonas Bernoulli
2017-08-11 10:26 ` git-handler.el Michael Albinus
2017-08-12 10:48 ` git-handler.el Jonas Bernoulli
2017-08-12 12:01 ` git-handler.el Eli Zaretskii
2017-08-12 17:26 ` Jonas Bernoulli [this message]
2017-08-12 17:43 ` git-handler.el Eli Zaretskii
2017-08-12 19:32 ` git-handler.el Michael Albinus
2017-08-12 18:22 ` git-handler.el John Wiegley
2017-08-12 18:28 ` git-handler.el Michael Albinus
2017-08-12 19:52 ` git-handler.el Jonas Bernoulli
2017-08-13 9:26 ` git-handler.el Michael Albinus
2017-08-12 19:17 ` git-handler.el Michael Albinus
2017-08-12 19:46 ` git-handler.el Yuri Khan
2017-08-13 9:14 ` git-handler.el Michael Albinus
2017-08-13 10:08 ` git-handler.el Yuri Khan
2017-08-13 14:31 ` git-handler.el Eli Zaretskii
2017-08-13 15:08 ` git-handler.el Yuri Khan
2017-08-13 15:26 ` git-handler.el Eli Zaretskii
2017-08-14 16:42 ` git-handler.el Michael Albinus
2017-08-14 16:40 ` git-handler.el Michael Albinus
2017-07-10 16:16 ` In support of Jonas Bernoulli's Magit (was: comparing code on different branches) Filipe Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a834d7ew.fsf@bernoul.li \
--to=jonas@bernoul.li \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).