From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS54825 147.75.192.0/21 X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B573B1F44D for ; Fri, 15 Mar 2024 07:30:46 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=bit-artificer.com header.i=@bit-artificer.com header.a=rsa-sha256 header.s=20230529 header.b=Mw3OZbZP; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 22EAB1C217A9 for ; Fri, 15 Mar 2024 07:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E26A1429A; Fri, 15 Mar 2024 07:30:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bit-artificer.com header.i=@bit-artificer.com header.b="Mw3OZbZP" Received: from smtp.bit-artificer.com (smtp.bit-artificer.com [172.105.170.90]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9996312E63 for ; Fri, 15 Mar 2024 07:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.170.90 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710487840; cv=none; b=nvBqQlLEqkOkxShtu6ESovWh8PF6GoDS4GU5d/sOzOhqoTD4zkwSuxuuxcnSRWHQ9CHezzCB3Qre2TdltQAtskq6Ivom05mXV4vfAPv44V8c95rIKS74cT3jrWigDCq0Hp9phGmRKTiim4p8+E2ZXK7/MySkDmaCwVfpijOVulI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710487840; c=relaxed/simple; bh=DtruQOTOGQFO/oNzZmlITQXW6OpJMyuYzQ/dPD2FD+U=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Subject; b=BgPjrsgc4JyX1KLaoDALNwzz7cdGhtNA5loHvQ3UJmol8wfKYU7su02glGR3fgewiAEzfgjBUsGrKm7VPFt//KNMzRomrL70gpobzyLI285Un7VHuOwJ4o95mg55fxegImINIQnuGeTKSLfNGXxMaS3eqz/WlJauD30uMILfXl0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bit-artificer.com; spf=pass smtp.mailfrom=bit-artificer.com; dkim=pass (2048-bit key) header.d=bit-artificer.com header.i=@bit-artificer.com header.b=Mw3OZbZP; arc=none smtp.client-ip=172.105.170.90 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bit-artificer.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bit-artificer.com Received: from localhost (193-115-73-98.tpgi.com.au [193.115.73.98]) by smtp.bit-artificer.com (Postfix) with ESMTPSA id 1080E3C0BB for ; Fri, 15 Mar 2024 07:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bit-artificer.com; s=20230529; t=1710487441; bh=fdTFwdxmv7oTJ/ATlImwCR7OoH0u+7hmg7Vyzx5yEQY=; h=Date:From:To:Subject:From; b=Mw3OZbZPzlxyyRwQesr9qYhGn8yTS6Bpg5tq0w1kM+rXS+GpfWqSw/MQ2m8OCNAN6 bN0pRcDr7miLCjbt7WrOw/CpxroOZJNkFAHtjvmQ+8DEgoji5asVxAhwwfSgeE1pTC xnvenTostCjSSQsW4AnJKPh7ji9JIIgkRpgjHxJrVG6TOgqYoD7htJDJeeMuHce7nn kmwV1zHa2aZCElHV9v4Cy3Qz27hEm6yC90M27vajZc/Mef6LVzjGtXUlu+qosiBUkG Hz9r/K3KmHN1SkkYUtrTkLFNYKe4F43kSzTA7i3+fWlPWbAkGbIuYtnWAN3xTiXBxl VEfiNG9938htA== Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 15 Mar 2024 17:53:59 +1030 Message-Id: From: "Thomas Lowry" To: Subject: Expanded worktree tooling? X-Mailer: aerc 0.15.2 Hello, I recently learned about worktrees in git and I was wondering if some extra tooling could benefit workflows that lean on it? These are the use cases I have banging around in my head: - throwaway/temp workspaces One use case that I've seen alot is creating a workspace to handle some hotfix and/or debugging and possibly commit the fix. Instead of needing to actively manage this workspace (mostly the cleanup) I imagine it would not be too dificult to these in the /tmp folder and then cleanup/ignore their entries. Temp workspace file paths might make this kind of tooling pointless unless you also automatically change the working directory to the new workspace.. I've seen people advocate for a git aliases that jump between workspaces but if your adding the workspace and typing out the file path anyways then `cd path` is shorter than an alias anyways. - move hunks between workspaces In my experience it's more common for a hotfix/debugging use case to get the report and just use the current branch since it's not often that your current branch is either completely broken or directly conflicts with the reported bug. I usually don't stashing and changing branches until I've got a fix and want to commit it. I recently tried a workspace for this situation but I ended needing to retype the fix in the new workspace, after reflecting a bit I should be able to do=20 `git stash -p` in the main workspace then `git stash pop` in the new worktree but a dedicated way to move hunks would be quite useful. I think there could be more opportunities for general use cases to benefit from workspaces if there were extra workspace tooling but these are the only ones I can think of, also to be clear I'm not really considering any tooling that would allow workspaces to do something you can't already do with git in some other way. Thoughts? Regards, Thomas