webdiff icon indicating copy to clipboard operation
webdiff copied to clipboard

Stage/Unstage/commit diffs from browser

Open ryan-williams opened this issue 11 years ago • 2 comments

Check out GitX; it has not been updated since 2009 AFAICT but I use it as a pretty handy diff viewer / commit-creation tool. Notable features:

  • stage/unstage diffs
    • per file
    • per logical diff chunk
    • per line
  • type commit messages / create commits
  • bonus: ammend commits
    • somewhat hackily implemented / buggy

GitX has some annoying issues:

  • no way to turn off OSX spell-checker by default (always turns on at start up), leading to many DYACs in commit msgs
  • sometimes mysteriously spins with 100% CPU in background when it shouldn't be doing anything
  • generally kind of slow
  • could use some hot-key love

Some of GitX combined with your vision for webdiff could be really killer: better diffing (e.g. inline diff highlighting), syntax highlighting, general web-interface goodness, reflecting changes on disk in realtime, allowing inline editing?!!! so many possibilities.

Would love to port my existing GitX flow (stage/unstage/commit) to webdiff to start, though.

ryan-williams avatar Sep 04 '14 16:09 ryan-williams

It might make sense for this to be a separate process from git-webdiff, which is just a simple wrapper around the git-agnostic webdiff tool.

The main things needed to make it work would be:

  1. A way to select parts of the diff.
  2. Some notion of what's staged/unstaged.
  3. Callbacks in the server to make the commits.

This would be an undertaking, but I don't think it would be wildly difficult.

danvk avatar Sep 04 '14 16:09 danvk

cool.. some kind of git-http server that exposes an API to perform some obvious git operations, perhaps?

we should look into how GitX does things like staging specific hunks. i guess we could start with simple file-level staging, it's pretty obvious how to do that.

another component could be Watchman-ing your .git directory to feed changes to the UI in realtime?

ryan-williams avatar Sep 04 '14 16:09 ryan-williams