From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Yates Newsgroups: gmane.emacs.devel Subject: Re: On the adoption of transient.el Date: Sun, 15 Aug 2021 17:57:27 -0400 Message-ID: References: <877di4on3d.fsf@posteo.net> <87im1oy6mw.fsf@posteo.net> <87czquisme.fsf@bernoul.li> <87wnoofapr.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27612"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 15 23:59:07 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 1mFO9r-0006wd-DE for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Aug 2021 23:59:07 +0200 Original-Received: from localhost ([::1]:57256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFO9p-0000oq-KB for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Aug 2021 17:59:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFO8V-0008PT-QN for emacs-devel@gnu.org; Sun, 15 Aug 2021 17:57:43 -0400 Original-Received: from mail-ej1-f43.google.com ([209.85.218.43]:41675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFO8U-0004Rn-7U for emacs-devel@gnu.org; Sun, 15 Aug 2021 17:57:43 -0400 Original-Received: by mail-ej1-f43.google.com with SMTP id d11so28434226eja.8 for ; Sun, 15 Aug 2021 14:57:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=D0yOWKEywE8XgjtaaCqP6O5z5fTLgdlVx/b7LRMbgcM=; b=fX7NGqcmkuzrgVcbZDQGlqsckC76PjgvX+alaTrTuE4geXW2MXfwDlFU1W6S63oF/Q B1QDpAJxvTKOnd2Cv37HJh7m9tkGjDhlmANos/y+c8lwKXDk2bKdtqj2UR86Kxv3JBkP dh8WVPXuDjF/3TBGJ2t+79B/0Z8Wjg0MBspQvg6RiCXAvc8bE/9cfyLA+4QcP9Rm3AJ4 qtOGU+7TK5yUPCLspVPq0hnhM2HfjOXjyFpu9DIZTRrH3MFgH5eDJwh/6ShfFi+oDK81 f0XiQ7X/4L6NVLRstr9/r/4x/TbxNXnnnJ21KXvgie8GMgaYOw7oVUcEFf6uww+/r4Wo 29ng== X-Gm-Message-State: AOAM532/K5go7qhcAj3vYRdnJ0VBEr6EAVNBcD7yFPxw55nnrD7e19nN wRX16Ka6fd5MgtkGHRpbWU48putGbc+EgmesNt0= X-Google-Smtp-Source: ABdhPJyOBgOENRwgOaQaUsZeAegCCMpseC4s8YF0nymmQ/QgKEm2mYRBFKbux2aI4NBIIYPER/iHkaTHCpH1d51Xn34= X-Received: by 2002:a17:906:3745:: with SMTP id e5mr12926995ejc.400.1629064660244; Sun, 15 Aug 2021 14:57:40 -0700 (PDT) In-Reply-To: <87wnoofapr.fsf@telefonica.net> Received-SPF: pass client-ip=209.85.218.43; envelope-from=john.yates.sheets@gmail.com; helo=mail-ej1-f43.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:272413 Archived-At: On Sat, Aug 14, 2021 at 8:55 AM =C3=93scar Fuentes wrote: > Arthur Miller writes: > > The strategy is to stash save all buffers belonging to the project, > > stash everything, inclusive untracked files, and than checkout to the > > other branch. When checked back, the stash is applied back. I don't kno= w > > if you have something like that in magit or if it is something generall= y > > desirable, but I always wanted something simple and dirty to be able to > > switch fast when I need it. > > How would Magit know that when you "return back" to a branch it must > apply a certain stash? Rather than use a stash I would have a script that does two things: * Creates an undo script for the next step * Saves everything important as a new commit on the current branch. This would include, among other things, all untracked files and the undo script mentioned in the first step. Now with the workspace in a clean state you can switch away to some other branch. When you return to the original branch you run the undo script. It backs out the last commit. This would included performing git rm --cached