find
- Usage:
java gitlet.Main find [commit message]
- Description: Prints out the ids of all commits that have the given
commit message, one per line.
If there are multiple such commits, it prints the
ids out on separate lines. The commit message is a single operand; to
indicate a multiword message, put the operand in quotation marks, as for
the
commit
command above.
- Runtime: Should be linear relative to the number of commits.
- Failure cases: If no such commit exists, prints the error
message
Found no commit with that message.
- Dangerous?: No
- Differences from real git: Doesn't exist in real git. Similar
effects can be achieved by grepping the output of log.
- Our line count: ~15