Bug 222847 - git-webkit should have equivalent of svn up
Summary: git-webkit should have equivalent of svn up
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 18:55 PST by Ryosuke Niwa
Modified: 2021-03-08 19:05 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 18:55:50 PST
We should either make `git-webkit pull` or add a new command which behaves like `svn up`,
in that it automatically rebases local uncommitted changes against the latest trunk.
Comment 1 Ryosuke Niwa 2021-03-05 19:11:01 PST
For this command, it's very important for that I can do the equivalent of mine-full/mine-conflict. The whole git checkout --ours/--theirs business is way too confusing.
Comment 2 Ryosuke Niwa 2021-03-05 19:39:33 PST
Oh, also very important. We need an equivalent of:
svn up -r X

Like:
git-webkit up -c=<commit-identifier>

And that should checkout that exact version of "main" branch without getting into a detached state, creating a new branch, etc...

Ideally, this command will also support rN form of Subversion revision so that we can go from Subversion version on trac / bugzilla / etc... straight to checking it out on GitHub clone.
Comment 3 Radar WebKit Bug Importer 2021-03-08 08:31:21 PST
<rdar://problem/75171216>
Comment 4 Jonathan Bedard 2021-03-08 08:45:45 PST
We already have `git-webkit checkout <arg>`, which supports identifiers, revisions (in SVN and git-svn) and hashes (in git), but there are some missing pieces to it, namely, how this works when there are local edits.

I think avoiding the detached HEAD state is not something we should strive for. `git-webkit checkout <arg>` and `git-webkit pull` should behave in the detached HEAD state (not hard when branches have a defined priority, and ours do).
Comment 5 Ryosuke Niwa 2021-03-08 19:05:37 PST
(In reply to Jonathan Bedard from comment #4)
> We already have `git-webkit checkout <arg>`, which supports identifiers,
> revisions (in SVN and git-svn) and hashes (in git), but there are some
> missing pieces to it, namely, how this works when there are local edits.

That is good to know but does it create a new branch or modify the existing branch? I really want to modify the existing / current branch.

> I think avoiding the detached HEAD state is not something we should strive
> for. `git-webkit checkout <arg>` and `git-webkit pull` should behave in the
> detached HEAD state (not hard when branches have a defined priority, and
> ours do).

I mean... as long as detached HEAD state doesn't cause any problems with all other tools I have no problem with it. We just need to make sure none of the tools we use result in some kind of obscure error message.