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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 96FF31F619 for ; Wed, 26 Feb 2020 10:22:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbgBZKWL (ORCPT ); Wed, 26 Feb 2020 05:22:11 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:38094 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgBZKWL (ORCPT ); Wed, 26 Feb 2020 05:22:11 -0500 Received: by mail-qt1-f193.google.com with SMTP id i23so1849504qtr.5 for ; Wed, 26 Feb 2020 02:22:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hu+Wb/6Z8xqD9ADjs3PU9Xy1vMz+uGmAckss2IjiASs=; b=Q3rk3DsWITFQCDIMDXZCPTTNm4lzyvIwIf4xYs9FxWi6TdmotBT5UAAHTqSU8f2iqy GObN21TovuGqYThzkTW4Nan15aYEgZu8Yel2aMaalHvddzuxkbmiGsb6/q5Iht+i4z8U lxQOGuEIkMZYUies60HNCpybM5ffinnP7WMSJWOVrP8cTyUApCDaXJqPjebtT7Za9JGc 3QNTAy4CQVpgjuLJSTOg0LP3IAO6vFsm9T6uNxteQhsdcrFocEw5pkMd29ICKzLuIQMA eNO3LHP5wHo1OCKYJWjcSM1+1OtMDVDnNZ6+4qT0745QyRzlkVjcJJDePVQzDMxahKIt MmEg== 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; bh=Hu+Wb/6Z8xqD9ADjs3PU9Xy1vMz+uGmAckss2IjiASs=; b=t+Z6KQ4bEJQlWhjykmI9d8r84b4IUYheUAVTn5+wUV1hKybTjnGn9dISJIBh55+Laf zGn1ITPDjjuZw1vkEHqgLJMTtI7f72Rk5W+/72ODxZN3umQXivY2rsUE0n48geakKxhZ DPn/+t1zeDitmBRUFA1uluFjDacKYe9v+pnrDkJ2g2kH4V2JCIl7S6CUwPkPsbuzYASj Hxo/d5eL84UY415TT1147YuDBF5KA0yg4HD/XDmRiXF4i0FKlpb9pQb8FInRwKOOAn4K 4mSj1MMVuJp0jd7A6aelJMbiKe7NNZgxYwhQI9mJCfyrKgYHeOhieb77FOvvzM4q5gFw ZSkQ== X-Gm-Message-State: APjAAAXX0q2HIW9ZBpUie9h/cSgI861ZoaFrMfDsBOus+O+f9cQVyLZv fK6+OE8w1nAsI/Guz+eMCrcqJvvyf+u5RA9H1ad1aS+J X-Google-Smtp-Source: APXvYqxTCcOWfFlBySahtqVVdifaECIKW3Fg3GhsbyAxsW6F8R+R7nCg9+Z/nTyZ1pz7Vmg7MEme/k7lINu+KvSopPI= X-Received: by 2002:ac8:73c8:: with SMTP id v8mr3922452qtp.270.1582712530306; Wed, 26 Feb 2020 02:22:10 -0800 (PST) MIME-Version: 1.0 References: <20200226023909.GC7911@camp.crustytoothpaste.net> <20200226034731.GA2915944@coredump.intra.peff.net> <20200226094716.GA14546@coredump.intra.peff.net> In-Reply-To: <20200226094716.GA14546@coredump.intra.peff.net> From: Chris Jerdonek Date: Wed, 26 Feb 2020 02:21:59 -0800 Message-ID: Subject: Re: create reflog for reflog-less ref To: Jeff King Cc: "brian m. carlson" , git@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Feb 26, 2020 at 1:47 AM Jeff King wrote: > On Tue, Feb 25, 2020 at 11:18:39PM -0800, Chris Jerdonek wrote: > > It would be > > nice to be able to create (or append to) the reflog without having to > > change where the ref is pointing. Or maybe I'm missing a variation > > that will do this.. > ... > The "touch" trick I showed would work for that, but it's not going to be > portable going forward. I don't think it would be a bad idea to have > some way of triggering a "noop" reflog update via update-ref, where we > either create the reflog as empty, or insert a pointless entry going > from the current sha1 to itself. But AFAIK that doesn't exist right now. Thanks. By the way, this functionality does already seem to exist for ref HEAD: $ git update-ref -m my-message HEAD HEAD $ git reflog HEAD 3ccacdc (HEAD -> master) HEAD@{0}: my-message ... I don't know why it would work for HEAD though and what's different about the mechanism. I thought it might be because it's a symbolic ref, but it didn't work for other symbolic refs when I tried (even ones that already had a reflog). --Chris