Write index before writing index tree in seedTestRepo test helper #347

Merged
geordie merged 1 commits from master into master 2016-10-03 04:37:05 -05:00
geordie commented 2016-09-17 00:00:54 -05:00 (Migrated from github.com)

The seedTestRepo() test helper function leaves the seeded repo in an unusual state because the index is not written before the index tree is written. To correct, simply write the index before writing the index tree.

BEFORE change, seedTestRepo() leaves repo in this state:

On branch master
Changes to be committed:
(use "git reset HEAD ..." to unstage)

deleted: README

Untracked files:
(use "git add ..." to include in what will be committed)

README

AFTER change, seedTestRepo() leaves repo in this state:

On branch master
nothing to commit, working directory clean

The seedTestRepo() test helper function leaves the seeded repo in an unusual state because the index is not written before the index tree is written. To correct, simply write the index before writing the index tree. **BEFORE** change, seedTestRepo() leaves repo in this state: > On branch master > Changes to be committed: > (use "git reset HEAD <file>..." to unstage) > > deleted: README > > Untracked files: > (use "git add <file>..." to include in what will be committed) > > README **AFTER** change, seedTestRepo() leaves repo in this state: > On branch master > nothing to commit, working directory clean
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#347
No description provided.