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

Unstaged type changes and deletions are misrecognized as staged changes #536

Open
mlell opened this issue Oct 25, 2023 · 0 comments
Open

Comments

@mlell
Copy link

mlell commented Oct 25, 2023

Hi, thank you for maintaining this script, it helps me every day!

I am using git annex, so my repository contains a lot of symlinks (git-annex maintains a separate storage of large files in .git/ and commits symlinks to these files instead of the big files themselves). The files that are annexed are results of a scientific pipeline, so when the computation is executed, it will replace the committed version (i.e., the symlinks) by a regular file with the new content. Executing git annex add will move these files to the annex storage and create new symlinks in their place. This means that I get a lot of "typechange" git status outputs:

$ git status
On branch master
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   .doit.db.db
        deleted:    data/03 Merge genomic and phenotypic/BLUEs/blues_across.qs
        deleted:    data/03 Merge genomic and phenotypic/BLUEs/blues_within.qs
        typechange: data/03 Merge genomic and phenotypic/Match genotype names/ARGV.rds
        typechange: data/03 Merge genomic and phenotypic/Match genotype names/genotypes.fst

or when using git status -s:

$ git status -s
 M .doit.db.db
 D "data/03 Merge genomic and phenotypic/BLUEs/blues_across.qs"
 D "data/03 Merge genomic and phenotypic/BLUEs/blues_within.qs"
 T "data/03 Merge genomic and phenotypic/Match genotype names/ARGV.rds"
 T "data/03 Merge genomic and phenotypic/Match genotype names/genotypes.fst"
  • Expectation: bash-git-prompt shows [master L|✚ 5]
  • Actual behaviour: bash-git-prompt shows [master L|●2✚ 3]
  • Version of bash-git-prompt: 5cf208c` (2023-10-12)

So it shows my deletions and typechanges are staged changes.

@mlell mlell changed the title Unstaged type changes are misrecognized as staged changes Unstaged type changes and deletions are misrecognized as staged changes Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant