hoduche / git-graph

Learn Git fast and well - by visualizing the inner graph of your Git repositories
MIT License
56 stars 10 forks source link

git graph not working #7

Open shashwatj07 opened 4 years ago

shashwatj07 commented 4 years ago

Installed git-graph after satisfying all the dependencies. However, on running the git graph command, I get this on a keyboard interrupt after waiting for a minute.

$ git graph
Traceback (most recent call last):
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\Scripts\git-graph-script.py", line 11, in <module>
    load_entry_point('git-graph==1.2', 'console_scripts', 'git-graph')()
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\site-packages\git_graph\cli.py", line 58, in main
    dot_graph = dg.DotGraph(git_path, nodes=args.nodes)
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\site-packages\git_graph\dot_graph.py", line 78, in __init__
    git_graph = gg.GitGraph(self.git_path).build_graph()
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\site-packages\git_graph\git_graph_class.py", line 87, in build_graph
    self.trees = build_git_trees(self.path, trees)
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\site-packages\git_graph\git_graph_class.py", line 11, in build_git_trees
    for each_line in gf.read_git_file(path, each_tree):
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\site-packages\git_graph\git_functions.py", line 24, in read_git_file
    return execute_git_command(path, 'cat-file -p ' + sha1_file)
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\site-packages\git_graph\git_functions.py", line 14, in execute_git_command
    output = subprocess.run(bash_command.split(), stdout=subprocess.PIPE)
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 490, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "C:\Users\Shashwat\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 951, in communicate
    stdout = self.stdout.read()
KeyboardInterrupt
hoduche commented 4 years ago

Can you please try to install from GitHub and run the pytest command to check if it succeeds or fails similarly ? Thanks

shashwatj07 commented 4 years ago

I tried it again. It appears that it only works with repositories with a very small number of commits.

hoduche commented 4 years ago

Normally the graph should be created whatever the repository size. However for large graph rendering, GraphViz dot can encounter difficulties and hang forever.