-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
epicProbably requires a lot of workProbably requires a lot of work
Description
- no config.workingDir & config.stagingArea: put in one list.
object looks like: @{state=$_[0];file=$file;staged=$true}
need to add ;working=$false
Use number indexes for workingDir and alphabet for stagingArea?
all Git-functions should define a config about what they are supposed to do
and be updated on checkout/add/...
$filter = ({
param($fileInfo)
$fileInfo.state -ne 'D'
})
$config = @{
gitCommand="git add";
staging=$false;
working=$true;
defaultToAllFiles=$true;
extraFileFilterFn=$filter; # only Git-NumberedDiff needs this atm. is this necessary?
}
function Execute-GitConfig($config, $fileInfo) {
if ($args.length -eq 0 -or $args[0] -eq $null) {
$args = @("0-$($global:gitStatusNumbers.stagingArea.length - 1)")
}
$fileInfos = Parse-GitIndexes $args 'stagingArea'
if (-not $fileInfos) {
return
}
$files = $fileInfos | % {$_.file}
Invoke-Git diff --cached $files
}
- Git-NumberedDiff: Should also work for already staged files
- Git-NumberedReset: Should also work for not staged files that are then Git-NumberedAdded
- Git-NumberedAdd/Diff should allow args like -p / --word-diff: ga -p / gdc / gdw / gdcw ?
- Keep track of added/reset files and use diff --cached to keep gd working
- Staged file can be added again after a grs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epicProbably requires a lot of workProbably requires a lot of work