Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Challenge 26 - Write Your Own Git (#37)
* Completed git init command with tests * Added objects/info and objects/pack dir in init command * added copy files for challenge-26 command while building. Started hash-object function and added tests * Added write option support in hashObject function. Updated tests for hashObject functionality * Added catFile command support and tests. Refactored code. Added jestHelpers * Refactored args for each command to improve TDD * refactored all the commands to simply return a string output or raise error. Added updateIndex command * refactored constants, added index file parser, added update-index command tests * renamed index.ts to git.ts * added 'add' command * Added status command, updated tsconfig to support glob package * added extension parsing, create Index class, refactored code * added write tree functionality. Added mode field to IndexEntry. Added Tree object. * removed console.log statement from status.ts * Refactored types.ts * refactored fileModeString and fileType function * added functionality to run commands from inside the git repo * Added more tests for updateIndex command * Added comments and TODOs. Updated init.test.ts * Added tests for indexParser * removed add argument from updateIndex. Completed write-tree command. Created tree for filesystem * Completed write-tree command with dir and subdir entries. Fixed typo in writing cachedtree to index. Moved functions to utils. refactored code. * Added commit-tree command. Added utils to read user info from .gitconfig * added tests for utils.ts * Updated timezoneoffset calculation. handled deleted files in update-index command * refactored catfile.ts, added util function to parse gitObject * Added decode Tree function * Added Signature class, refactored code. Added function to retireve commit tree hash value from .git/refs/heads. Added decode commit functionality * Fixed decoding a tree. Fixed tree insert function. Completed status command. * Added tests for writeTree. Fixed insert function of Tree. Fixed decodeTree function * added tests for commitTree command. Added tests for Signature class. Fixed decodeCommit function and decodeSignature function * completed commit command. Added more info about commit in status output * Added JSDOC about packfile while using parseObject function * Completed git diff. Refactored code to retreive file statuses * Added README. Added docs folder for commad description. Completed doc for init command * Added docs for hash-object and cat-file command. Update doc for init. Update README and added links to new command docs * Added docs for update-index/add and status command. * added docs for write-tree, commit-tree, commit and diff command. Updated links in README as well. * Added JSDOC. Added more comments. Refactored interfaces * mocking getSignature function in tests. Fixed getTimeAndTimeZone function * Added link to challenge 26 in global README
- Loading branch information