Bug 222848 - Add git-webkit revert <file-path>
Summary: Add git-webkit revert <file-path>
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-05 19:00 PST by Ryosuke Niwa
Modified: 2021-03-08 18:58 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2021-03-05 19:00:47 PST
It's really counterintuitive that we'd have to reset the file
and then checkout in order to revert local changes in Git.

We should add git-webkit revert <file-path> to emulate svn revert.
Comment 1 Radar WebKit Bug Importer 2021-03-08 08:32:24 PST
<rdar://problem/75171248>
Comment 2 Jonathan Bedard 2021-03-08 08:47:25 PST
How would `git-webkit revert <file-path>` be different from `git checkout <file-path>`? `revert` is reserved for un-doing commits in git.
Comment 3 Ryosuke Niwa 2021-03-08 18:58:10 PST
(In reply to Jonathan Bedard from comment #2)
> How would `git-webkit revert <file-path>` be different from `git checkout
> <file-path>`? `revert` is reserved for un-doing commits in git.

It would be different in that it also unstaged commits. There is also difference in that when you're in a merge conflict, etc... this command can resolve the conflict as we picked theirs-full.

As we discussed in slack, we can call this "discard" instead.