From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 601B71F8C1 for ; Fri, 1 May 2020 22:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726344AbgEAWWb (ORCPT ); Fri, 1 May 2020 18:22:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbgEAWWa (ORCPT ); Fri, 1 May 2020 18:22:30 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EEE7C061A0C for ; Fri, 1 May 2020 15:22:29 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id r4so5154934pgg.4 for ; Fri, 01 May 2020 15:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=sP1NYTPjasMhJytIULtl/CSOETXV9eQGGjsj4IxKgw4=; b=Ufn7Y3AyGeqKsm5hOOu92gwAV6ExS5lci5nmPvxI+p3g2q81Iat/bcez5KICFF8BWZ ++ASGejUe6e8u04HY7QiE611qMGdaKwF041Fh5vUOYB5oDwlU0OQ1+HkjxrL+rFRwzeR Anni4mCdMTty28KCCgNT1hlyntSxr8tisFAvsbDBgUQHcGFxMf0tWTU5cO7t/qybi36s LI9NR1WN6niAjiduns13hSDW8kr4j5V1Tyj3LjoaLkiFmY3vtGRMfT+TMDzY0H9aXGFd HIZ11B5kR5EhQZCFD2J3rZaHh38Dxc5+NMWDvjCTtpgCuYamzGJo5OlPjCtApQvs2G4C y7FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sP1NYTPjasMhJytIULtl/CSOETXV9eQGGjsj4IxKgw4=; b=rixeKpUS+XHWPWOsN60pzp0Gv5klubE3/LzBDB2TTP0jDxCuM4UOPWJR33I/1OuIdi Fi+ihvX5A75uWiU/+S9YEq76JpqeQ0RDmlfMAA6FJf4YXEub/3lSIYTM3lORuMQiK/ZW pNMW61HVC43mruQ3SvwTwIxocIBRIFANoqBsMKLOwyn85c7qjfXOUdXSYwO35dxfEDs8 4Mepuug6Js5NldPg4T8zjcM8E9Mj4F1f5544RIRpirpukyee174jFP4ynhH/4dTBhT7S PQdcfei23tPwl/ova59wDiFN/ZMpf+t8LixgdnLDKbvj/tx9YLOP9sqcCRL2xoC1Em02 aaxw== X-Gm-Message-State: AGi0PubIQyV378k5sDUU1+Z26Ihyz+nOBJVE/J0lHSYOSVhlpHqSGG1f vZXH6Xg3+2AWwJqpMPINjHTAhzRmZA/HCpNz X-Google-Smtp-Source: APiQypL0yTGZUbCJXzUr/eJVplPELm9gkXvF7PFw3NJRJ9Ucd/rebkdt4kLwf+wmkNISKj5LLyWodQ== X-Received: by 2002:a63:fb16:: with SMTP id o22mr5917611pgh.86.1588371748854; Fri, 01 May 2020 15:22:28 -0700 (PDT) Received: from localhost ([8.44.146.30]) by smtp.gmail.com with ESMTPSA id r17sm2852266pgn.35.2020.05.01.15.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 15:22:28 -0700 (PDT) Date: Fri, 1 May 2020 16:22:27 -0600 From: Taylor Blau To: Sergey Organov Cc: Konstantin Khomoutov , Junio C Hamano , Taylor Blau , Ivan Tham , git@vger.kernel.org, "brian m . carlson" Subject: Re: [PATCH] branch: add '-' to delete previous branch Message-ID: <20200501222227.GE41612@syl.local> References: <877dxyo1k8.fsf@osv.gnss.ru> <20200429190013.GG83442@syl.local> <87v9likr5a.fsf@osv.gnss.ru> <20200429195745.GC3920@syl.local> <87imhihwbw.fsf@osv.gnss.ru> <20200430162753.pg6kpm6jlubotjlk@carbon> <87zhas3teg.fsf@osv.gnss.ru> <20200501094432.u3bl24qou5sgbgxk@carbon> <87r1w43qfy.fsf@osv.gnss.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87r1w43qfy.fsf@osv.gnss.ru> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, May 01, 2020 at 01:22:25PM +0300, Sergey Organov wrote: > Konstantin Khomoutov writes: > > > On Fri, May 01, 2020 at 12:18:31PM +0300, Sergey Organov wrote: > > > > [...] > >> >> I would speculate that `git checkout -` may have learned about "-" > >> >> simply from the `cd -` ... > >> > > >> > You do not have to speculate. You only need to read what has been > >> > already said in the thread ;-). > >> > >> Should I expect "git checkout ~" to get me to my "home" branch then? ;-) > > > > Heh, no you shouldn't: the '~' is expanded by the shell itself according > > to its parameter expansion rules, so `cd` never sees the bare tilde > > in this case ;-) > > Yeah, but then git could compare its argument to $HOME and "do the right > thing" ;-) Just kidding, obviously. > > That said, bare "cd" also changes to home directory, so bare "git > checkout" could become as useful. My qualms about the general usefulness of a bare 'git checkout' going to some bookmarked branch aside, this won't work, since a bare 'git checkout' already sets HEAD to the currently checked-out branch. That said, I am not at all sold on this being a good idea. > > > >> Actually, that could be a good idea. I mean, to have "home" branch > >> notion and a short-cut for it. > > > > I have no say for the idea per se but you would have hard time using > > bare tilda character for that precisely because of it being special to > > Unix shells - you'd need to escape it all the time (though something > > like unquoted @{~} would work just OK). > > Yes, plain '~' won't do. > > -- Sergey Thanks, Taylor