Junio C Hamano wrote: > Thomas Rast <trast@xxxxxxxxxxxxxxx> writes: > > + GIT_EDITOR=: test_must_fail git rebase -i --root --onto master && > > Maybe I am misrecalling things but didn't we have reports from people on > some platforms that single-shot exporting of the environment like this one > does not work for them? Then that deserves a fix, though I should point out that the original patches (now on master) have the same code in them. [So many quirks and so little time!] > > +sed 's/#/ /g' > expect-conflict-p <<'EOF' > > +* Merge branch 'third' into other > > +|\## > > +| * 6 > > +* | Merge branch 'side' into other > > +|\ \## > > +| * | 5 > > +* | | 4 > > +|/ /## > > +* | 3 > > +|/## > > +* conflict > > +* 2 > > +* 1 > > +EOF > > I do not like this very much. Future improvements of the graph drawing > algorithm (one obvious "flaw" you are exposing by the above is that it has > trailing whitespaces that can be trimmed, and somebody else may be > inclined to fix) would break the expectation this test vector has. > > Do you have to compare the topology this way, or are there other more > reliable ways? It would certainly be possible to test the SHA1 of the resulting branch tip, but t/README says I shouldn't. Or we could spell it out as a series of 'parent of X is Y' and 'message of Y is foo' tests, which seems rather messy. The above approach at least has the advantage that a test failure due to format change can be diagnosed very quickly just from the diff that is shown with -v. -- Thomas Rast trast@{inf,student}.ethz.ch
Attachment:
signature.asc
Description: This is a digitally signed message part.