{"thread":{"id":"52923","subject":"feature suggestion: git symbolic-ref --create-reflog","startedAt":"2020-03-01T02:08:38Z","lastAt":"2020-03-01T02:08:38Z","messageCount":1,"participants":["Chris Jerdonek"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"392723","messageId":"CAOTb1wcJyQchyGqTqY6B+j94Tw6Htp7tB4Bt-J7pyXBC7q-XCg@mail.gmail.com","threadId":"52923","inReplyTo":null,"subject":"feature suggestion: git symbolic-ref --create-reflog","fromName":"Chris Jerdonek","fromEmail":"chris.jerdonek@gmail.com","sentAt":"2020-03-01T02:08:24Z","receivedAt":"2020-03-01T02:08:38Z","isPatch":false,"sender":{"key":"chris.jerdonek@gmail.com","avatar":"https://gravatar.com/avatar/86b2cff752baeaabcfaf26ff30fd8f74c5caf8657fdb7990dc3c787d542f26a3?d=mp&s=160"},"body":"This email is to suggest the idea of adding a --create-reflog flag to\ngit-symbolic-ref in the same way that git-update-ref has one.\n\n(This suggestion relates to my previous email with subject \"ambiguous\ngit-reflog output for symbolic refs,\" which points out an issue with\ngit-reflog for symbolic refs that don't have a reflog:\nhttps://public-inbox.org/git/CAOTb1wfXp+gXSwbG-CVgVE8E_5yzxQKwNKh_=3ECqTMvZFw7dQ@mail.gmail.com/T/#u\n)\n\nTo illustrate, if you create a symbolic ref in the standard set, it\ncreates a reflog for the symbolic ref:\n\n$ git symbolic-ref -m create-symref refs/heads/my-new-symref refs/heads/master\n$ cat .git/logs/refs/heads/my-new-symref\n0000000000000000000000000000000000000000\nb2d80b44f20594470d9f3c2d16bbb83d71370e1e Chris Jerdonek\n<chris.jerdonek@gmail.com> 1583026811 -0800 create-symref\n\nBut if you create one outside of the standard set, it doesn't (and\nthere's no --create-reflog option like there is with git-update-ref):\n\n$ git symbolic-ref -m create-symref refs/foo/my-new-symref refs/heads/master\n$ cat .git/logs/refs/foo/my-new-symref\ncat: .git/logs/refs/foo/my-new-symref: No such file or directory\n\nI do notice that Jeff's \"one-shot config\" approach that he suggested\nin reply to an earlier email of mine [1] (with subject line \"create\nreflog for reflog-less ref\") provides a workaround in the absence of\nthis option:\n\n$ git -c core.logAllRefUpdates=always symbolic-ref -m one-shot\nrefs/foo/my-symref refs/heads/master\n$ cat .git/logs/refs/foo/my-symref\n0000000000000000000000000000000000000000\nb2d80b44f20594470d9f3c2d16bbb83d71370e1e Chris Jerdonek\n<chris.jerdonek@gmail.com> 1583027929 -0800 one-shot\n\n--Chris\n\n[1]: https://public-inbox.org/git/CAOTb1wc2uMSyc7DMau2cWrWtk=_Z94+CCovORj1dGCrwgJhL=w@mail.gmail.com/\n"}]}