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

V3 Uncommitted Files, CLI and Filewatching (part 2) #5945

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

Byron
Copy link
Collaborator

@Byron Byron commented Jan 14, 2025

This PR introduces a new crate for the code that will drive the V3 of the UI design, with the goal of sketching out the API that shows how to deal with uncommited files.

This sketch should also include an idea how to listen to changes to the filesystem to produce events that help maintain the current state.

Follow-up of #5912 .

Tasks

  • initial state of uncommitted files
  • a new CLI to show uncommitted files
  • tests
    • case-insensitive FS test
    • also: see what happens if there are case-collisions (two files fold into one name on a case-insensitive fs)
  • IMPORTANT: use gix from main before merging
    • executable bit + modified == modified? Doesn't matter, just be sure UI can easily show it.
    • untracked must be obvious
    • blend gix::*::Change::Type into Change::Modification maybe
      • Actually this helps the code, even though on the consumer side it's a little awkward to use
    • sort changes in tests
    • One set of information per path, worktree takes precedence and and overrides the index
      • ignore the index, but not untracked
    • no IntentToAdd for Frontend
    • Flag with TypeChange or +x or -x

Notes for the reviewer

  • I left the code in but-core besides gix there are no dependencies needed to handle the but_core::WorktreeChanges.
  • Definitely needs .git/index tracking - if it changes while a commit is made, we have to reconcile (or at least assure nothing can go wrong)

For later

  • provide patch for a change
  • locking information

Copy link

vercel bot commented Jan 14, 2025

@Byron is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

@vercel vercel bot temporarily deployed to Preview – gitbutler-components January 14, 2025 10:48 Inactive
Copy link

vercel bot commented Jan 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2025 11:00am

@Byron Byron changed the title V3 Uncommitted Files, CLI and Filewatching V3 Uncommitted Files, CLI and Filewatching (part 2) Jan 14, 2025
@github-actions github-actions bot added the rust Pull requests that update Rust code label Jan 14, 2025
That way it will provide the needed information.
Copy link
Member

@krlvi krlvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly discussed offline - thanks for this. Im gonna merge this and put together a typescript representation of the return

@krlvi krlvi merged commit f5a5b81 into gitbutlerapp:master Jan 17, 2025
22 of 23 checks passed
@Byron Byron deleted the staging branch January 17, 2025 15:34
@Byron
Copy link
Collaborator Author

Byron commented Jan 17, 2025

So fast!

@Byron Byron mentioned this pull request Jan 17, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants