14

Considering I have the following ASCII graph:

A---B---C---D---E---F master
     \         /
      X---Y---Z topic

(stolen from a recent but unrelated question)

Is there a command/script/tool which accepts this as input and creates the dummy commits accordingly?

Community
  • 1
  • 1
Debilski
  • 66,976
  • 12
  • 110
  • 133
  • 2
    +1 I was thinking the same when recreating the history of the previous question :) – rtn Apr 20 '12 at 15:01
  • 2
    Exactly this as input, or would a more machine-friendly format be acceptable? – Richard Hansen Apr 20 '12 at 15:22
  • 1
    Well, this is, I think, the git documentation standard, so it would be best if it could be parsed without further changes. – Debilski Apr 20 '12 at 15:36
  • 3
    I don't know one, but it would be easy to split this task in two. Parse the graph, and from a graph generate appropriate commits. This way it would be even easier to have parsers for different versions of the graph (this one, and the one provided by git log --graph) – Colin Hebert Apr 20 '12 at 15:38
  • 1
    What are the file contents and metadata, such as timestamps and commit messages for each commit? – amcnabb Apr 21 '12 at 04:47
  • This is an interesting question, but I cannot think of a reason to do it. @Debilski ? – New Alexandria Aug 18 '12 at 17:58
  • 1
    I wish all Git Tutorials or Scripts would provide a transcript for creating the test repo, or offer a public one to clone. Especially Git books should work within this example. – eckes Apr 19 '13 at 01:22

1 Answers1

7

[Okay, I'll bite...] No, there isn't.

[edit] So you might ask "How can you answer 'no' - you can't prove a negative". Well, if you can define the 'universe' and exhaustively search the 'universe' then you can prove a negative. For my 'no' answer, I've defined the 'universe' as the set of git utilities provided as part of the git distribution. If you define the 'universe' as 'all current and future git utilities' then the answer might not be 'no.'

GoZoner
  • 67,920
  • 20
  • 95
  • 145