git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/5] rebase: fix breakage with `format.useAutoBase`

From
Denton Liu <liu.denton@gmail.com>
Date
Dec 4, 2019, 07:47 UTC
Message-ID
<cover.1575445582.git.liu.denton@gmail.com>
In-Reply-To
<cover.1574878089.git.liu.denton@gmail.com>

Apparently, this use case has been broken for a long time... Since bb52995f3e (format-patch: introduce format.useAutoBase configuration, 2016-04-26). I'm surprised it's only been reported now.

This patchset fixes the breakage by teaching `git format-patch --no-base` and making rebase use it.

This patch is based on the latest master since it's such an old bug that only got noticed recently, I'm not sure if it's worth fixing in 'maint'. The series does not apply cleanly on top of 'maint' because it relies on c1a6f21cd4 (Doc: add more detail for git-format-patch, 2019-08-27) but the conflicts are relatively minor.

Changes since v2:
* Remove spurious indentation change
* Rebase onto the latest master
Changes since v1:
* Update some log messages
Denton Liu (5):
  t3400: demonstrate failure with format.useAutoBase
  format-patch: fix indentation
  t4014: use test_config()
  format-patch: teach --no-base
  rebase: fix format.useAutoBase breakage
 Documentation/git-format-patch.txt |  5 +++--
 builtin/log.c                      | 24 +++++++++++++++++++++---
 builtin/rebase.c                   |  3 ++-
 t/t3400-rebase.sh                  |  6 ++++++
 t/t4014-format-patch.sh            | 14 +++++++++-----
 5 files changed, 41 insertions(+), 11 deletions(-)
Range-diff against v2:
1:  4089e51041 = 1:  8d67bbe5bf t3400: demonstrate failure with format.useAutoBase
2:  d288d6c3a5 = 2:  8cfde9f98e format-patch: fix indentation
3:  196b5d8dbc = 3:  638c4add00 t4014: use test_config()
4:  f7e5325cc0 ! 4:  6cba51ca24 format-patch: teach --no-base
    @@ builtin/log.c: int cmd_format_patch(int argc, const char **argv, const char *pre
     +			   N_("add prerequisite tree info to the patch series"),
     +			   0, base_callback },
      		OPT_FILENAME(0, "signature-file", &signature_file,
    --				N_("add a signature from a file")),
    -+			N_("add a signature from a file")),
    + 				N_("add a signature from a file")),
      		OPT__QUIET(&quiet, N_("don't print the patch filenames")),
    - 		OPT_BOOL(0, "progress", &show_progress,
    - 			 N_("show progress while generating patches")),
     
      ## t/t4014-format-patch.sh ##
     @@ t/t4014-format-patch.sh: test_expect_success 'format-patch --base overrides format.useAutoBase' '
5:  62c59c12e3 = 5:  eb266aaedc rebase: fix format.useAutoBase breakage
-- 
2.24.0.578.g4820254054
Previous: Christian BiesingerNext: Denton Liu
Message 20 of 33 in “Bug with "git rebase" when format.useAutoBase is set”
  1. Christian BiesingerNov 26, 2019
  2. 0/5 rebase: fix breakage with `format.useAutoBase`Denton Liu, Nov 27, 2019
  3. 1/5 t3400: demonstrate failure with format.useAutoBaseDenton Liu, Nov 27, 2019
  4. Eric SunshineNov 27, 2019
  5. Junio C HamanoNov 30, 2019
  6. 2/5 format-patch: fix indentationDenton Liu, Nov 27, 2019
  7. 3/5 t4014: use `test_config`Denton Liu, Nov 27, 2019
  8. 4/5 format-patch: teach --no-baseDenton Liu, Nov 27, 2019
  9. 5/5 rebase: fix `format.useAutoBase` breakageDenton Liu, Nov 27, 2019
  10. Eric SunshineNov 27, 2019
  11. Christian BiesingerNov 27, 2019
  12. 0/5 rebase: fix breakage with `format.useAutoBase`Denton Liu, Nov 27, 2019
  13. 1/5 t3400: demonstrate failure with format.useAutoBaseDenton Liu, Nov 27, 2019
  14. 2/5 format-patch: fix indentationDenton Liu, Nov 27, 2019
  15. 3/5 t4014: use test_config()Denton Liu, Nov 27, 2019
  16. 4/5 format-patch: teach --no-baseDenton Liu, Nov 27, 2019
  17. Denton LiuNov 27, 2019
  18. 5/5 rebase: fix format.useAutoBase breakageDenton Liu, Nov 27, 2019
  19. Christian BiesingerDec 4, 2019
  20. 0/5 rebase: fix breakage with `format.useAutoBase`Denton Liu, Dec 4, 2019
  21. 1/5 t3400: demonstrate failure with format.useAutoBaseDenton Liu, Dec 4, 2019
  22. 2/5 format-patch: fix indentationDenton Liu, Dec 4, 2019
  23. 4/5 format-patch: teach --no-baseDenton Liu, Dec 4, 2019
  24. René ScharfeDec 4, 2019
  25. Junio C HamanoDec 4, 2019
  26. 3/5 t4014: use test_config()Denton Liu, Dec 4, 2019
  27. 5/5 rebase: fix format.useAutoBase breakageDenton Liu, Dec 4, 2019
  28. 0/5 rebase: fix breakage with `format.useAutoBase`Denton Liu, Dec 4, 2019
  29. 1/5 t3400: demonstrate failure with format.useAutoBaseDenton Liu, Dec 4, 2019
  30. 2/5 format-patch: fix indentationDenton Liu, Dec 4, 2019
  31. 3/5 t4014: use test_config()Denton Liu, Dec 4, 2019
  32. 4/5 format-patch: teach --no-baseDenton Liu, Dec 4, 2019
  33. 5/5 rebase: fix format.useAutoBase breakageDenton Liu, Dec 4, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.