Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Working Directory and Staging Area support to YAML files #284

Open
benthayer opened this issue Aug 13, 2020 · 2 comments
Open

Add Working Directory and Staging Area support to YAML files #284

benthayer opened this issue Aug 13, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@benthayer
Copy link
Owner

Currently, YAML files can change the contents of commits, but we don't use them to change the contents of the WD or SA. We need a syntax for this and an implementation of this.

@benthayer benthayer added this to the 1.0 milestone Aug 13, 2020
@benthayer benthayer self-assigned this Aug 13, 2020
@benthayer
Copy link
Owner Author

One implementation:

'Working Directory':
  base: 'HEAD'
'Staging Area':
  base: 'Working Directory'

This one would set the contents of the working directory to be the same as commit 1

'Working Directory':
  base: '1'
  add-files:
# same as other directives
'Staging Area':
  files:

Base can be HEAD or any of the top level commit-ishs in the YAML

Staging Area defaults to Working Directory and Working Directory defaults to HEAD.

If base is specified, then we can use add-files and remove-files just like we can in commits, otherwise files should be specified.

With this, it might follow that merges and other commits can havie this same framework applied. For merges, you could base the commit off of either parent, and add-files/remove-files would could be used to set the files for the commit

@benthayer
Copy link
Owner Author

To start, implementing files for Working Directory and Staging Area would be the easiest.

@benthayer benthayer added the enhancement New feature or request label Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant