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 command re-adds folders that are already committed #461

Open
rockenbf opened this issue Nov 7, 2024 · 1 comment
Open

Add command re-adds folders that are already committed #461

rockenbf opened this issue Nov 7, 2024 · 1 comment

Comments

@rockenbf
Copy link
Contributor

rockenbf commented Nov 7, 2024

When running oxen add * in a clean (fully committed) repo that has files in sub-folders, the sub-folders ar added again and show as to be committed in oxen status. I assume this could have a similar root-cause as issue #460.

Oxen version: 0.19.6 / 0.19.4
OS version: Pop!_OS 22.04 LTS

Minimal example to reproduce the problem:

user@machine:/tmp$ mkdir test-repo && cd test-repo
user@machine:/tmp/test-repo$ oxen init
🐂 repository initialized at: "/tmp/test-repo"
user@machine:/tmp/test-repo$ mkdir test-folder && cd test-folder
user@machine:/tmp/test-repo/test-folder$ printf '%s\n' 'name,age' 'bob,12' 'jane,13' 'joe,14' > people.txt
user@machine:/tmp/test-repo/test-folder$ oxen add people.txt 
🐂 oxen added 0 files (0 B) in 46ms
user@machine:/tmp/test-repo/test-folder$ oxen status 
Untracked Directories
  (use "oxen add <dir>..." to update what will be committed)
  test-folder/ (1 item)

user@machine:/tmp/test-repo/test-folder$ cd ..
user@machine:/tmp/test-repo$ oxen status 
Untracked Directories
  (use "oxen add <dir>..." to update what will be committed)
  test-folder/ (1 item)

user@machine:/tmp/test-repo$ oxen add test-folder
🐂 oxen added 1 files (31 B) in 25ms
user@machine:/tmp/test-repo$ oxen status
Directories to be committed
  added: test-folder with 1 file

Files to be committed:
  (use "oxen restore --staged <file> ..." to unstage)
  new file: test-folder/people.txt

user@machine:/tmp/test-repo$ oxen commit -m "test commit"
Committing with message: test commit
🐂 commit 9384274310a1a38e80c576f08eef5602 -> 'test commit' in 38ms
user@machine:/tmp/test-repo$ oxen status 
On branch main -> 9384274310a1a38e80c576f08eef5602

nothing to commit, working tree clean
user@machine:/tmp/test-repo$ oxen add *
🐂 oxen added 0 files (0 B) in 30ms
user@machine:/tmp/test-repo$ oxen status 
On branch main -> 9384274310a1a38e80c576f08eef5602

Directories to be committed
  added: test-folder

@gschoeni
Copy link
Collaborator

gschoeni commented Nov 7, 2024

Interesting, it could also be an issue with doing the operations while you are in the subdirectory. We will take a look 🕵️

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

2 participants