| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
When no index file exists and a baseline is not explicitly provided, use an empty baseline instead of trying to load `HEAD`.
|
Note that this is still not completely correct: the "is this dirty" checkout conflict handling is not correctly taking the index into account but that's a different (and bigger) issue and I will follow up with a related pull request. |
Sorry, something went wrong.
|
Seems legit. Or at least we're doing mostly what git does. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When no index file exists and a baseline is not explicitly provided, use an empty baseline instead of trying to use HEAD as the baseline.
This is for compatibility with git:
% git status On branch master nothing to commit, working directory clean % rm .git/index % git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) deleted: README deleted: branch_file.txt deleted: link_to_new.txt deleted: new.txt Untracked files: (use "git add <file>..." to include in what will be committed) README branch_file.txt link_to_new.txt new.txt % git checkout HEAD error: The following untracked working tree files would be overwritten by checkout: README branch_file.txt link_to_new.txt new.txt Please move or remove them before you can switch branches. Aborting % git checkout --force HEAD % git status On branch master nothing to commit, working directory cleanOur previous behavior was to try to load HEAD when the index does not exist, which would simply do a diff between the baseline (HEAD) and the target (again, HEAD), which would be a noop.
Fixes #3811