Thread (9 messages) 9 messages, 5 authors, 2021-09-01

Re: [PATCH] rebase, cherry-pick, revert: only run from toplevel

flat view

From: Johannes Sixt <hidden>
Date: 2021-08-31 05:55:54

Am 31.08.21 um 05:03 schrieb Elijah Newren via GitGitGadget:
From: Elijah Newren <redacted>

Allowing rebase, cherry-pick and revert to run from subdirectories
inevitably leads to eventual user confusion.  For example, if they
are within a directory that was created by one of the patches being
rebased, then the rebase operation could hit a conflict before the
directory is restored leading the user to be running from a directory
that no longer exists.  Similarly with cherry-pick and revert, those
operations could result in the directory being removed.

Similar to bisect, simply require that these commands be run from the
toplevel to avoid such problems.
I am not a friend of this change. I understand the motivation behind it.
But most of the time, rebase and cherry-pick are operated on own code,
where directories do not disappear and appear at random, and this new
enforced condition becomes awkward.

One of my use-cases is that I operate git-rebase from an untracked build
directory inside the repository. Having to pass -C .. all the time
strikes the wrong balance, IMO.

Things are slightly different for git-bisect (at least for me), because
oftentimes it is operated on foreign code, where you may not know which
directories come and go. But even that is a weak argument to force the
command to the top-level of the repository.

Perhaps it is sufficient to force git-pull to the top-level (if it isn't
already).

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help