* Johannes Sixt <j.sixt@xxxxxxxxxxxxx> [091217 12:40]: > > I want the default for format-patch changed. > > I do not see why format-patch would have to be changed. The case that you > outline (a merge -s ours happened and you want to follow only one parent) > is rare enough While it is rare, the result format-patch currently produces is quite a desaster without any need. > and even more rarly will somebody want to apply format-patch to such a history. > But I guess that you are actually not interested in format-patch per se, > but rather in rebase (which uses format-patch). I'm looking for a nice way to store the history of a patches in a Debian package. Currently the best way is to use quilt and store the patches in git. Topgit is quite overkill, git directly preserving history means no way to export sane patches. And git rebase -i means losing history of previous states and pullability. An way to combine those is doing many trivial merges, but that kills rebase and format-patch. (While the patch exporting for creating the debian source packages could change to the right directory and give the proper arguments, needing to remember the extra argument and teaching anyone else involved how to call it to get what to sent to upstream is annoying). > I haven't looked at the code, but wouldn't it be matter of "if we do not > have any pathspec, add '.'" *after* all options are parsed? That's what I would say my patch is doing. > git rev-list -- . works in a bare repository, too. If you hard-code "-- ." > in the rev-list invocations in git-rebase[--interactive], then it cannot > be said that this works "by chance" due to cd_to_toplevel. It works in a bare repository. But it does not work when called from a subdirectory of the working dir. The easiest way I see to express generally git rev-list --prune-tree $args is topdir=$(git rev-parse --show-cdup) if test -z "$topdir" ; then topdir=. fi set -- $args while test $# -gt 0 ; do if test "x$1" = "x--" ; then break fi shift done if test $# -gt 1 ; then git rev-list $args elif test $# -eq 1 ; then git rev-list $args $topdir else git rev-list $args -- $topdir fi Hochachtungsvoll, Bernhard R. Link -- "Never contain programs so few bugs, as when no debugging tools are available!" Niklaus Wirth -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html