Comments (4)
Here is another one, seem the issues is "fixed" by an intermediate call to git diff
(which reports an empty diff).
❯ git st
modified: src/linkml/schemas/datalad-dataset-components.yaml (file)
untracked: src/examples/datalad-dataset.jsonld
❯ git st
modified: src/linkml/schemas/datalad-dataset-components.yaml (file)
untracked: src/examples/datalad-dataset.jsonld
❯ git diff
❯ git st
untracked: src/examples/datalad-dataset.jsonld
from datalad-next.
I have a situation now, where I have a file open in vim
. The file is in a plain Git repo, tracked, and has no modifications wrt to the committed state.
After I save the file in vim, no modifications, just :write
, I see this "wrong" report.
❯ datalad next-status
modified: src/examples/dataset-version/DatasetVersionObject-penguins.yaml (file)
The cause for this report is that git diff-index
shows it too!
❯ git diff-index HEAD
:100644 100644 03657a3bf83d09a48060228feed6a70237ef4600 0000000000000000000000000000000000000000 M src/examples/dataset-version/DatasetVersionObject-penguins.yaml
As soon as I run git diff
or git status
it is gone, as soon as I save the file in vim again, it is back:
❯ git diff
❯ git diff-index HEAD
❯ git diff-index HEAD
:100644 100644 03657a3bf83d09a48060228feed6a70237ef4600 0000000000000000000000000000000000000000 M src/examples/dataset-version/DatasetVersionObject-penguins.yaml
from datalad-next.
https://stackoverflow.com/questions/34807971/why-does-git-diff-index-head-result-change-for-touched-files-after-git-diff-or-g has an explanation and possible mitigation strategy.
from datalad-next.
But there is more to this issue. I can do the exact same action (open README.md file in vim, make no change, but write it out again) in two different repos. I get the modification report on one repo (clone of https://github.com/psychoinformatics-de/datalad-concepts), but not another (clone of https://github.com/datalad/datalad-next).
from datalad-next.
Related Issues (20)
- Handle global option `-c` properly HOT 2
- `next-status` claims nothing to save when all is staged and no HEAD
- External protocol specifications with `shell` based "driver" implementation
- A `sibling` command to rule them all HOT 3
- External protocol for secret store adaptors
- Warning: `cannot collect test class 'TestArchive' because it has a __init__`
- Revamp `save` with improved messages
- `pytest` now unintentional runtime dependency HOT 1
- Add note that `rev-parse --path-format=relative` requires Git > 2.30
- [WARNING] Could not load extension 'next': ImportError(cannot import name 'Dataset' from partially initialized module 'datalad.api' HOT 1
- Failing testing of datalad "core" HOT 2
- 1.4 introduced build reproducibility issue
- Remove manual subpackage doc listing -> `__all__`
- Add `pathspecs` argument to `iter_gitworktree()` docstring
- Move to `hatch`? HOT 1
- Support for detection of (un)staged changes?
- datalad-core's `test_wtf` fails on `main` HOT 2
- WEBDAV-related special remote error HOT 8
- Switch to `rich` for any and all terminal rendering/interaction needs
- Homogenize (and fix) implementations of `iter_gitdiff|status()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datalad-next.