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

Directory history displays irrelevant changes #902

Open
minwoox opened this issue Dec 7, 2023 · 10 comments
Open

Directory history displays irrelevant changes #902

minwoox opened this issue Dec 7, 2023 · 10 comments
Labels

Comments

@minwoox
Copy link
Member

minwoox commented Dec 7, 2023

I've identified an issue where the history of a directory includes irrelevant changes when the modified files or directories share the same name as the target directory. For instance, the directory /a displays changes for /ab/a.txt, /a.json, and other unrelated items in its history.

image
@minwoox minwoox added the defect label Dec 7, 2023
@thachlp
Copy link
Member

thachlp commented Jan 24, 2024

Hi @minwoox, as I understand, your a repository only has /ab/a.txt and /a.json, but the history includes /a_b/a.txt, right?
Maybe I misunderstood because I can not reproduce on my local.

@minwoox
Copy link
Member Author

minwoox commented Jan 24, 2024

your a repository

It's a directory and the history should show the history of the a directory only.
However, it also displays the history of other files (e.g. /abc/a.txt) that are not related to the a directory.
Please, let me know if you can't reproduce it. I will probably provide a repro for this. 😉

@thachlp
Copy link
Member

thachlp commented Jan 24, 2024

Thanks for explaining to me.
So the expected is that, even /ab/a.txt is a child of a, the history of a should only include files, not repository, right?

@minwoox
Copy link
Member Author

minwoox commented Jan 24, 2024

even /ab/a.txt is a child of a

/ab/a.txt is not relevant to /a directory. It should show files in the directory such as /a/a.txt, /a/b.json. etc. 😉

@thachlp
Copy link
Member

thachlp commented Jan 25, 2024

/a
├── a.txt
├── a.json
└── /ab
    ├── a.txt
    └── a.json

I mean here, the history of /a should only contain the history of /a/a.txt and /a/a.json?

Please help confirm to make sure I understand correctly 😁. If we require that, I will try to fix this.

@minwoox
Copy link
Member Author

minwoox commented Jan 26, 2024

Sorry about the ambiguity in my comments. 😓

|---- foo (directory)
|     |---- bar.txt
|     |---- baz.json
|---- foobao (directory)
|     |---- bar1.txt
|     |---- baz1.json

When two different directories exist at the same level (e.g., foo and foobao), each directory should display its own history. However, if the name of another directory (foobao) starts with the directory name (foo), the history of the former directory is included in the latter's history.

@thachlp
Copy link
Member

thachlp commented Jan 26, 2024

Thanks for clarifying, I can reproduce it now 👍
I will take this.

@minwoox
Copy link
Member Author

minwoox commented Feb 21, 2024

@thachlp hey~ Any progress so far? 😄

@thachlp
Copy link
Member

thachlp commented Feb 23, 2024

Not much, I have backed from 3 weeks vacation. I will continue this on this weekend 🚀🚀

@thachlp
Copy link
Member

thachlp commented Feb 25, 2024

I tested on local with my pr:

CURRENT

/dogma
Revision Summary Author Timestamp
5 Add /foo/baz2.txt admin 4 hours ago
4 Add /foo2/bar2.txt admin 14 hours ago
3 Add /foo/bar.txt admin 14 hours ago
2 Initialize metadata System 14 hours ago
1 Create a new repository System 14 hours ago

/foo
Revision Summary Author Timestamp
5 Add /foo/baz2.txt admin 4 hours ago
4 Add /foo2/bar2.txt admin 14 hours ago
3 Add /foo/bar.txt admin 14 hours ago

/foo2
Revision Summary Author Timestamp
4 Add /foo2/bar2.txt admin 14 hours ago

BECOME

/dogma
Revision Summary Author Timestamp
5 Add /foo/baz2.txt admin 4 hours ago
4 Add /foo2/bar2.txt admin 14 hours ago
3 Add /foo/bar.txt admin 14 hours ago
2 Initialize metadata System 14 hours ago
1 Create a new repository System 14 hours ago

/foo
Revision Summary Author Timestamp
5 Add /foo/baz2.txt admin 4 hours ago
3 Add /foo/bar.txt admin 14 hours ago
1 Create a new repository System 14 hours ago

/foo2
Revision Summary Author Timestamp
4 Add /foo2/bar2.txt admin 14 hours ago
1 Create a new repository System 14 hours ago

It fixes the issue but includes revision 1 to /foo and /foo2 🧐
Please help review @minwoox 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants