From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: On the adoption of transient.el Date: Fri, 06 Aug 2021 14:13:28 +1200 Message-ID: <43a99b5e963075dd1a22a3b2c450f73a@webmail.orcon.net.nz> References: <877di4on3d.fsf@posteo.net> <87im1oy6mw.fsf@posteo.net> <87y29hihea.fsf@posteo.net> <87sfzonu6k.fsf@ucl.ac.uk> <878s1gqlop.fsf@gmail.com> <8735ronpo0.fsf@ucl.ac.uk> <83lf5gjgtp.fsf@gnu.org> <87eeb8gdbq.fsf@telefonica.net> <83eeb7kgrb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11258"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 06 04:14:21 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBpNM-0002if-EN for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Aug 2021 04:14:20 +0200 Original-Received: from localhost ([::1]:52774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBpNF-0007Ef-MS for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Aug 2021 22:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBpMh-0006aL-8i for emacs-devel@gnu.org; Thu, 05 Aug 2021 22:13:39 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:53509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBpMf-0006mc-FR; Thu, 05 Aug 2021 22:13:39 -0400 Original-Received: from [10.253.37.70] (port=63149 helo=webmail.orcon.net.nz) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1mBpMW-0003I8-Cd; Fri, 06 Aug 2021 14:13:28 +1200 Original-Received: from ip-116-251-162-85.kinect.net.nz ([116.251.162.85]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Fri, 06 Aug 2021 14:13:28 +1200 In-Reply-To: <83eeb7kgrb.fsf@gnu.org> X-Sender: psainty@orcon.net.nz X-GeoIP: -- Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@orcon.net.nz; helo=smtp-1.orcon.net.nz X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272119 Archived-At: On 2021-08-06 04:17, Eli Zaretskii wrote: > I'm afraid I'm not following. If I find by searching the net the > sequence of Git commands to do some job, I just copy/paste them into > the shell window, and that's it. And no need to memorize those > commands: the next time I need to do the same job, I do the net search > again. Since the search hits the right answers very quickly, this is > very adequate for jobs I need to do rarely (which is why I don't > remember the commands in the first place). > > What am I missing? Maybe nothing? It's hard to say. On occasion I'll revert to the same search-online process (an example I can think of being finding the reference for a deleted-but-not-yet-garbage-collected commit; that's not something I'd look to Magit to resolve). Here's a description of Magit that I once wrote. It wasn't aimed at Emacs users, so some of the benefits apply equally to vc, and your definition of "complex" might not align with mine. The most complex things I do on a regular basis are probably all related to rebasing, and you've said you rarely do any of that, whereas I do it a great deal, partly because Magit makes it so easy. E.g. If I realise there is a bug in a commit somewhere in my unmerged work-in-progress branch, then I will squash the fix into the original commit 99% of the time, because doing so takes me about 5 seconds. FWIW... Magit provides highly interactive views of your repository, with simple and efficient key bindings to perform actions (which are often contextual), such that even complex tasks become remarkably quick and easy to do. A help buffer displays the available keys at any given time, so it's always easy to see what the options are. The main status buffer has collapsible sections for the repo as a whole, so you not only see which files are staged and unstaged (or untracked, stashed, unpushed, etc), but you can interactively expand and collapse the entries to see some/all the diffs; stage or unstage things with at a keystroke (where "things" can be all changes, or a single file, or a single hunk of the diff for that file, or a user-selected region!). Grooming your commits is ludicrously easy and intuitive when you can just eye-ball the current state and then point at things to add to (or remove from) that state. Naturally committing and writing (or amending) commit messages inside the editor is very streamlined. Logs are interactive, as each line of the log buffer represents a commit, so any command which accepts a reference (commit hash, branch name, tag, etc) can be performed by typing the keys for that action with the cursor on the log entry for that reference, and Magit will contextually use that reference (or offer it as a default) for the command (e.g. viewing, branching, merging, rebasing, etc...) Diffs are interactive, so you can jump to the relevant file in the editor (in either its 'before' or 'after' state for that diff), or apply (or revert) the changes for a file/hunk/region of the diff at a keystroke. e.g. You could display the diff for a stash (or for a commit from another branch) and then interactively apply only part of it. History rewriting becomes trivial when you can stage some changes and then point at any commit and say "amend this commit", and it just happens. Or reword an earlier commit message at any time in the same manner. Or rebase a range of commits onto a different base by visually choosing the relevant log entries. Or make a series of fixup commits (again simply choosing the target log entry each time without needing to care what the hashes are), and then autosquash them all in a couple of keystrokes. Magit interacts with existing conflict resolution tools in Emacs, so you can smoothly deal with conflicts without leaving the editor. There's plenty more, but hopefully that gives an idea of what Magit is about. It doesn't try to provide any unfamiliar abstractions -- it just makes things fast and easy. Complex things become simple, and simple things become trivial. There are very few times that I ever find myself needing a command line to do something with git, as everything which Magit supports (which more than covers my day-to-day needs) is just nicer to do inside Magit, without ever leaving the editor.