git ubuntu merge UX improvements

Bug #1705395 reported by Nish Aravamudan on 2017-07-20
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usd-importer
Undecided
Nish Aravamudan

Bug Description

Fleshing the idea out a bit more.

`git ubuntu merge start` saves parameters to .git/GIT_UBUNTU_MERGE_TODO
`git ubuntu merge [!start]` uses values from .git/GIT_UBUNTU_MERGE_TODO, and errors if it cannot find that file
`git ubuntu merge --continue` is used to iterate through our workflow steps by storing the current step in .git/GIT_UBUNTU_MERGE_TODO (which is not required, but does help us encapsulate steps like rebasing onto new/debian which has changed with the updated importer code)
`git ubuntu merge finish` deletes .git/GIT_UBUNTU_MERGE_TODO
`git ubuntu merge [--quit|--abort]` added to stop at any given step and to reset back to the original state respectively.

Original description:

1) commitish=HEAD by default
2) save parameters to `git ubuntu merge start` into .git, update git_ps1
3) `git ubuntu merge finish` without parameters should use that file, if available, allowing user to override.
4) provide `git ubuntu merge abort` to break out of state, meaning we need to save original commitish (or ensure we do everything without changing working tree)

Nish Aravamudan (nacc) on 2017-07-20
description: updated
Nish Aravamudan (nacc) on 2017-07-20
summary: - git ubuntu merge start UX improvements
+ git ubuntu merge UX improvements
Nish Aravamudan (nacc) on 2017-08-02
Changed in usd-importer:
milestone: none → 1.0
status: New → Triaged
Nish Aravamudan (nacc) wrote :

@Christian, @Andreas, what do you think of my suggested changes? Given our new code, I think we would be able to use a temporary worktree (chdir'd to it after start) for doing the merge and finish would put you back where you started, at the update-maitainer commit (similar to what we do now, but everything is done in the worktree) and the worktree is pruned.

Or, if you abort, the worktree is simply pruned and you are put back in our old directory.

Changed in usd-importer:
assignee: nobody → Nish Aravamudan (nacc)
Nish Aravamudan (nacc) on 2017-10-26
Changed in usd-importer:
milestone: 1.0 → future
Andreas Hasenack (ahasenack) wrote :

I like how rebase -i works. It's in the same directory of the repository, and the PS1 shell variable is updated accordingly via __git_ps1(). And I can simply abort and I will be back in my original state. The same happens with a merge that fails due to conflicts, my prompt always tells me in which state I am, even if I chdir out of the repository and later come back in.

I haven't used worktrees elsewhere, so maybe I just need getting some used-to, but the above is what I feel comfortable with now.

Robie Basak (racb) on 2017-11-28
tags: added: merge
Nish Aravamudan (nacc) on 2018-01-24
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers