[PATCH] D59837: Add "git llvm revert" subcommand

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 16:58:42 PDT 2019


rupprecht added inline comments.


================
Comment at: llvm/utils/git-svn/git-llvm:438
+
+    log(lookup_llvm_svn_id(args.revision))
+
----------------
jlebar wrote:
> Upon reflection: The chance that a 5-digit git hex hash contains only decimal digits is `(10/16)^5 = 9%`.  So I don't think it's going to work here or in cmd_revert to say that a five-decimal-digit number is always an svn revision.
> 
> Instead maybe we say, it's an svn rev if it starts with `r`, otherwise it's a git rev?
> 
> Once we do that then I'd say that lookup_llvm_svn_id should only operate on git hashes, because right now we have the strange behavior that cmd_svn_lookup will accept an SVN revision, but that's just the identity function.
It's not *quite* an identity function. Given `r123456` it returns `123456` so we can grep for `llvm-svn: 123456`. (For just `123456`, it is the identity).

But that's not a good enough reason to keep it there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59837/new/

https://reviews.llvm.org/D59837





More information about the llvm-commits mailing list