From: Junio C Hamano Date: Fri, 28 Nov 2025 20:50:39 GMT Subject: Re: [PATCH 0/1] replay: add --revert option to reverse commit changes Message-ID: In-Reply-To: Elijah Newren writes: > How does one distinguish the "topic~5" in the range "topic~5 > topic~3..topic" from > * the topic~5 in "^topic~7 topic~5" Two answers. (1) You don't have to. When you scan cmdline->rev[], you can notice the ^topic-7 form and reject, saying "we accept A..B but not ^A B." (2) Or you design and document the interpretation you implement when you see a negative commit while you scan over cmdline->rev[]. Perhaps you may make "^topic-7" to require a positive commit after it and convert "^topic-7 topic5" as if the user gave you a single "topic~7..topic~5". Or you may do something else. My assumption has been (1). > * the "topic1" and "topic2" in "^$OLD_COMMIT --ancestry-path topic1 topic2" I haven't thought it through, but doesn't ancetry-path imply you are really interested in the traditional connected set of commits? The path is a connected subset inside those commits after all, no?