Deutsch English Français Italiano |
<vhu6uc$20p3q$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> Newsgroups: comp.os.vms Subject: Re: in-memory editing with EDT or EVE Date: Sat, 23 Nov 2024 22:35:41 -0500 Organization: A noiseless patient Spider Lines: 98 Message-ID: <vhu6uc$20p3q$1@dont-email.me> References: <vhr9ct$1dilp$1@dont-email.me> <vhrd3u$1dqca$3@dont-email.me> <vhsm4i$1nfvc$1@dont-email.me> <vhsotb$rki$1@reader2.panix.com> <vht5qt$1qel2$1@dont-email.me> <vht6v1$1qfvl$1@dont-email.me> <vhtd6v$1rl0c$1@dont-email.me> <vhttf3$1u7an$1@dont-email.me> <vhu4gg$1v7cm$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 24 Nov 2024 04:35:41 +0100 (CET) Injection-Info: dont-email.me; posting-host="b1842fbfd955b0d1788f5b5ce59852d3"; logging-data="2122874"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WNk1x/RKIVQBD8dnTEM+92/2AfP27V8E=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Vr06KXjpXrBmSmy5RrWJArjkj/g= In-Reply-To: <vhu4gg$1v7cm$1@dont-email.me> Content-Language: en-US Bytes: 4622 On 11/23/2024 9:54 PM, Craig A. Berry wrote: > On 11/23/24 6:53 PM, Arne Vajhøj wrote: >> On 11/23/2024 3:16 PM, Craig A. Berry wrote: >>> There is no "client." In a DVCS like git, when you commit a change, >>> everything is written locally. Pushing to a server is an optional >>> separate operation and what you push is the version history that has >>> been written locally first. There is never a point where the commit >>> message is sent over the network to another machine before being stored >>> as one component of a commit. >> >> OK. I am still thinking SVNish. Sorry. >> >> But does it matter? >> >> edit disk file--read disk file--write to local repo >> vs >> edit in memory--write to local repo >> >> still seem like a difference to me. >> >> Or is git external editor actual editing the final file >> inside the repo? > > As I tried to explain before, a git commit consists of the metadata > (author, timestamp, etc.), the commit message, the branch, and the > actual diff content of the changeset. All of the other pieces are > stored on-disk, so it's hard to see a reason to keep the commit message > in memory when it needs to be combined with the other pieces in order to > produce the commit. I am thinking differently. Let us say hypothetical that you were doing a code review of some code and you noticed that function A was passing a string to function B by having A write it to a temporary file and B reading it from the temporary file. Both A and B are doing lots of other IO so the overall performance impact is insignificant. Would you approve the code? I assume not. In that case it is obvious funky because passing a string between functions is very basic. Doing in memory editing is not quite as basic. But it is possible. With EDT and TPU on VMS. So I was thinking that maybe it is still funky to do it that way. > It should also be mentioned that the editor used for editing commit > messages is configurable, so git's process for producing a commit needs > to work with any and every editor. I know. That was the topic in one of the VSI forum threads. I am not expecting GIT to change. Very few editors will be callable and allow for a custom fileio function. And: if ((OS = "VMS") and ((editor = "EDT") or (editor = "TPU))) then use callable editor on in memory data else use external editor on temp file end if is not pretty. > What problem are you trying to solve by keeping a kilobyte or three in > memory instead of persisting it to disk where any and every utility in > the toolbox can operate on it? I am not really trying to solve a GIT problem. GIT works. And VMS is not an important platform for GIT. More like using the GIT editor case to point out that the standard VMS editors has some nice capabilities, that could be useful for somebody. If somebody have a program that need to allow user to edit data and the program is VMS specific and the target editors are EDT and TPU, then maybe doing the edit in memory makes sense. You can still argue that both subprocess with external editor and temp file or simple callable editor editor with temp file is simpler code wise using just the VMS provided API's and not some wrapper found on the internet. But I like multiple options. Arne