GithubHelp home page GithubHelp logo

git-vanity's People

Contributors

tochev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

git-vanity's Issues

Search cannot be canceled

When a search is taking too long, it should be able to cancel it using Ctrl+C. This doesn't work (at least in Windows cmd/Powershell):

git_vanity.py DEC1A551F1ED
Attempting to find sha1 prefix `DEC1A551F1ED'
for commit `302e61425849fbfa779a9bb34a44673fe42cafbf'
[...]
Processing GS iteration 1
   Time:         0:00:00
   Last Speed:   N/A MH/s      (Avg: N/A MH/s)
   Tries remaining (optimistic):  100.000000% ...
   Chance (CDF):                  0.000000% ...
Processing GS iteration 11
   Time:         0:00:01.039226
   Last Speed:   40.4375 MH/s     (Avg: 40.3599 MH/s)
   Tries remaining (optimistic):  99.999985% ...
   Chance (CDF):                  0.000015% ...
From cffi callback <function _py_ref at 0x000001E8E92D6840>:
Traceback (most recent call last):
  File "C:\Python37\lib\site-packages\pyopencl\cffi_cl.py", line 72, in _py_ref
    @_ffi.callback('void*(void*)')
KeyboardInterrupt
Processing GS iteration 21
   Time:         0:00:02.065515
   Last Speed:   40.9083 MH/s     (Avg: 40.6127 MH/s)
   Tries remaining (optimistic):  99.999970% ...
   Chance (CDF):                  0.000030% ...

...and it just continues running. The only way to stop it is to kill the terminal or the python process.

Use signature as nonce.

I use a Curve25519 keypair for signing commits, would it be possible to use the nonce in this signature as the source of change for vanity commits?

Sometimes finding incorrect hashes on a Mac

Completely understand that this is a pretty old project, so I don't expect a response at all, but just wondering if you might know why I'm getting intermittent (but consistent) errors when using certain prefixes.

This is the output I'm seeing

$ python3 ~/git-vanity/git_vanity.py '13131313' -W

# ... ...

Found sha1 prefix `13131313'
with sha1 `da8012b2b54026a46c1fd034db6374cadd5d4359'
Using 000000002CAED3E3
================
tree 5658bb0a57f6ceaf844a1ed92318bcebc827b2fe
parent f581ae8f8ad39b2f6f2ae789911dd229e63bfdf3
author Luke.Batchelor <[email protected]> 1516102222 +1100
committer Luke.Batchelor 000000002CAED3E3 <[email protected]> 1516102533 +1100

New commit
================


Writing changes to the repository...

Luke.Batchelor 000000002CAED3E3
[lbatch/test da8012b] New commit
 Author: Luke.Batchelor <[email protected]>
 Date: Tue Jan 16 22:30:22 2018 +1100
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo
Current HEAD:
da8012b2b54026a46c1fd034db6374cadd5d4359
All done.

I've had tons run fine, but certain prefixes consistently fail. '13' and '13131313'. Even after changing the state of the repo (making more commits, changing author name).

More info:

$ git cat-file -p HEAD

tree 5658bb0a57f6ceaf844a1ed92318bcebc827b2fe
parent f581ae8f8ad39b2f6f2ae789911dd229e63bfdf3
author Luke.Batchelor <[email protected]> 1516102222 +1100
committer Luke.Batchelor 000000002CAED3E3 <[email protected]> 1516102533 +1100

New commit
OSX Yosemite 10.10.5
MacBook Pro (Retina, 15-inch, Mid 2015)
2.5 GHz Intel Core i7
16 GB 1600 MHz DDR3
Intel Iris Pro 1536 MB

I was actually able to run all this without installing any of openCL.
When running I get these options

Choose platform:
[0] <pyopencl.Platform 'Apple' at 0x7fff0000>
Choice [0]:0

Choose device(s):
[0] <pyopencl.Device 'Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz' on 'Apple' at 0xffffffff>
[1] <pyopencl.Device 'Iris Pro' on 'Apple' at 0x1024500>
[2] <pyopencl.Device 'AMD Radeon R9 M370X Compute Engine' on 'Apple' at 0x1021c00>

and it runs fine with all three devices (except for getting the wrong sha's sometimes).

TypoError in raw mode

Im using CPython for Windows (downloaded from python.org) version 3.6.0.

git-vanity exits with a TypeError on moving the HEAD reference:

with sha1 ...
Using 000000001FB7AA44
================
tree ...
parent ...
parent ...
author ...
committer ...
vanity 000000001FB7AA44

(commit msg)
================


Writing changes to the repository...

Traceback (most recent call last):
  File "c:\Users\me\git-vanity\git_vanity.py", line 398, in <module>
    args.raw)
  File "c:\Users\me\git-vanity\git_vanity.py", line 343, in main
    amend_commit_using_raw(final_object)
  File "c:\Users\me\git-vanity\git_vanity.py", line 286, in amend_commit_using_raw
    subprocess.check_call(['git', 'update-ref', 'HEAD', commit])
  File "C:\Python36-32\lib\subprocess.py", line 286, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Python36-32\lib\subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Python36-32\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Python36-32\lib\subprocess.py", line 964, in _execute_child
    args = list2cmdline(args)
  File "C:\Python36-32\lib\subprocess.py", line 461, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: a bytes-like object is required, not 'str'

The commit itself was written, so I was able to execute git update-ref HEAD myself.

Note: I edited GS in the header, so my line numbers are +1 from the git version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.