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

Re: [PATCH v7 4/4] git-rebase: add keep_empty flag

From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date
Apr 19, 2012, 10:02 UTC
Message-ID
<4F8FE2CD.3070300@in.waw.pl>
In-Reply-To
<1334776680-23460-5-git-send-email-nhorman@tuxdriver.com>
On 04/18/2012 09:18 PM, Neil Horman wrote:
Show 14 quoted lines
> Add a command line switch to git-rebase to allow a user the ability to specify
> that they want to keep any commits in a series that are empty.
>
> When git-rebase's type is am, then this option will automatically keep any
> commit that has a tree object identical to its parent.
>
> This patch changes the default behavior of interactive rebases as well.  With
> this patch, git-rebase -i will produce a revision set passed to
> git-revision-editor, in which empty commits are commented out.  Empty commits
> may be kept manually by uncommenting them.  If the new --keep-empty option is
> used in an interactive rebase the empty commits will automatically all be
> uncommented in the editor.
>
> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>

Hi, this one seems to breaks many tests when /bin/sh=dash. (Both v6 in pu and this v7).

E.g. ./t3404-rebase-interactive.sh:

ok 1 - setup not ok - 2 rebase -i with the exec command not ok - 3 rebase -i with the exec command runs from tree root not ok - 4 rebase -i with the exec command checks tree cleanness not ok - 5 no changes are a nop not ok - 6 test the [branch] option not ok - 7 test --onto <branch> not ok - 8 rebase on top of a non-conflicting commit not ok - 9 reflog for the branch shows state before rebase not ok - 10 exchange two commits not ok - 11 stop on conflicting pick not ok - 12 abort not ok - 13 abort with error when new base cannot be checked out not ok - 14 retain authorship not ok - 15 squash not ok - 16 retain authorship when squashing not ok - 17 -p handles "no changes" gracefully not ok 18 - exchange two commits with -p # TODO known breakage not ok - 19 preserve merges with -p not ok - 20 edit ancestor with -p not ok - 21 --continue tries to commit not ok - 22 verbose flag is heeded, even after --continue not ok - 23 multi-squash only fires up editor once not ok - 24 multi-fixup does not fire up editor not ok - 25 commit message used after conflict not ok - 26 commit message retained after conflict not ok - 27 squash and fixup generate correct log messages not ok - 28 squash ignores comments not ok - 29 squash ignores blank lines not ok - 30 squash works as expected not ok - 31 interrupted squash works as expected not ok - 32 interrupted squash works as expected (case 2) not ok - 33 ignore patch if in upstream not ok - 34 --continue tries to commit, even for "edit" not ok - 35 aborted --continue does not squash commits after "edit" not ok - 36 auto-amend only edited commits after "edit" not ok - 37 clean error after failed "exec" not ok - 38 rebase a detached HEAD not ok - 39 rebase a commit violating pre-commit not ok - 40 rebase with a file named HEAD in worktree ok 41 - do "noop" when there is nothing to cherry-pick ok 42 - submodule rebase setup not ok - 43 submodule rebase -i ok 44 - submodule conflict setup not ok - 45 rebase -i continue with only submodule staged not ok - 46 rebase -i continue with unstaged submodule not ok - 47 avoid unnecessary reset not ok - 48 reword ok 49 - rebase -i can copy notes not ok - 50 rebase -i can copy notes over a fixup not ok - 51 rebase while detaching HEAD not ok - 52 always cherry-pick with --no-ff ok 53 - set up commits with funny messages not ok - 54 rebase-i history with funny messages

The problem seems to be that git-rebase says "Nothing to do" and returns 1.

- Zbyszek

Previous: Neil HormanNext: Thomas Rast
Message 102 of 121 in “Enhance git-rebases flexibiilty in handling empty commits”
  1. 0/4 Enhance git-rebases flexibiilty in handling empty commitsNeil Horman, Mar 30, 2012
  2. 1/4 git-cherry-pick: add keep-empty optionNeil Horman, Mar 30, 2012
  3. Junio C HamanoMar 30, 2012
  4. Jeff KingMar 30, 2012
  5. Neil HormanMar 31, 2012
  6. 2/4 git-rebase: add keep_empty flagNeil Horman, Mar 30, 2012
  7. Junio C HamanoMar 30, 2012
  8. Neil HormanMar 31, 2012
  9. 3/4 git-commit-am: Allow automatic rebasing to preserve empty commitsNeil Horman, Mar 30, 2012
  10. Junio C HamanoMar 30, 2012
  11. Neil HormanMar 31, 2012
  12. Junio C HamanoMar 30, 2012
  13. Neil HormanMar 31, 2012
  14. 4/4 git-commit-interactive: Allow rebasing to preserve empty commitsNeil Horman, Mar 30, 2012
  15. Junio C HamanoMar 30, 2012
  16. Neil HormanMar 31, 2012
  17. Junio C HamanoMar 30, 2012
  18. 0/5 Enhance git-rebases flexibiilty handling empty commits [v2]Neil Horman, Apr 5, 2012
  19. 1/5 argv-array: Add argv_array_pop function [v2]Neil Horman, Apr 5, 2012
  20. Junio C HamanoApr 5, 2012
  21. Neil HormanApr 5, 2012
  22. Neil HormanApr 6, 2012
  23. Jeff KingApr 6, 2012
  24. Neil HormanApr 6, 2012
  25. Junio C HamanoApr 6, 2012
  26. Jeff KingApr 6, 2012
  27. Cc tags in the commit message (Re: [PATCH 1/5] argv-array: Add argv_array_pop function [v2])Jonathan Nieder, Apr 6, 2012
  28. Junio C HamanoApr 6, 2012
  29. Jeff KingApr 6, 2012
  30. Junio C HamanoApr 6, 2012
  31. Neil HormanApr 6, 2012
  32. 2/5 git-cherry-pick: add allow-empty option [v2]Neil Horman, Apr 5, 2012
  33. 3/5 git-cherry-pick: Add ignore-if-made-empty option [v2]Neil Horman, Apr 5, 2012
  34. Junio C HamanoApr 5, 2012
  35. Neil HormanApr 5, 2012
  36. Junio C HamanoApr 6, 2012
  37. Neil HormanApr 6, 2012
  38. Johannes SixtApr 6, 2012
  39. 4/5 git-cherry-pick: Add test to validate new options [v2]Neil Horman, Apr 5, 2012
  40. 5/5 git-rebase: add keep_empty flag [v2]Neil Horman, Apr 5, 2012
  41. 0/4 Enhance git-rebases flexibiilty in handling empty commitsNeil Horman, Apr 10, 2012
  42. 1/4 git-cherry-pick: add allow-empty optionNeil Horman, Apr 10, 2012
  43. Junio C HamanoApr 10, 2012
  44. Neil HormanApr 10, 2012
  45. Junio C HamanoApr 10, 2012
  46. Neil HormanApr 10, 2012
  47. Junio C HamanoApr 10, 2012
  48. Neil HormanApr 10, 2012
  49. Junio C HamanoApr 10, 2012
  50. Neil HormanApr 11, 2012
  51. Junio C HamanoApr 11, 2012
  52. Neil HormanApr 11, 2012
  53. Junio C HamanoApr 11, 2012
  54. Neil HormanApr 11, 2012
  55. 2/4 git-cherry-pick: Add keep-redundant-commits optionNeil Horman, Apr 10, 2012
  56. Junio C HamanoApr 10, 2012
  57. Neil HormanApr 10, 2012
  58. 3/4 git-cherry-pick: Add test to validate new optionsNeil Horman, Apr 10, 2012
  59. 4/4 git-rebase: add keep_empty flagNeil Horman, Apr 10, 2012
  60. 0/4 Enhance git-rebases flexibiilty in handling empty commitsNeil Horman, Apr 13, 2012
  61. 1/4 git-cherry-pick: add allow-empty optionNeil Horman, Apr 13, 2012
  62. 2/4 git-cherry-pick: Add keep-redundant-commits optionNeil Horman, Apr 13, 2012
  63. Clemens BuchacherApr 15, 2012
  64. Neil HormanApr 16, 2012
  65. Clemens BuchacherApr 16, 2012
  66. Neil HormanApr 17, 2012
  67. Junio C HamanoApr 17, 2012
  68. Clemens BuchacherApr 17, 2012
  69. Neil HormanApr 18, 2012
  70. 3/4 git-cherry-pick: Add test to validate new optionsNeil Horman, Apr 13, 2012
  71. Clemens BuchacherApr 15, 2012
  72. Neil HormanApr 16, 2012
  73. Neil HormanApr 16, 2012
  74. Junio C HamanoApr 16, 2012
  75. Neil HormanApr 16, 2012
  76. Clemens BuchacherApr 16, 2012
  77. Neil HormanApr 17, 2012
  78. Clemens BuchacherApr 17, 2012
  79. Neil HormanApr 18, 2012
  80. Clemens BuchacherApr 18, 2012
  81. 4/4 git-rebase: add keep_empty flagNeil Horman, Apr 13, 2012
  82. Clemens BuchacherApr 15, 2012
  83. Neil HormanApr 16, 2012
  84. 0/4 Enhance git-rebases flexibiilty in handling empty commitsNeil Horman, Apr 17, 2012
  85. 1/4 git-cherry-pick: add allow-empty optionNeil Horman, Apr 17, 2012
  86. 2/4 git-cherry-pick: Add keep-redundant-commits optionNeil Horman, Apr 17, 2012
  87. Clemens BuchacherApr 17, 2012
  88. Neil HormanApr 18, 2012
  89. 3/4 git-cherry-pick: Add test to validate new optionsNeil Horman, Apr 17, 2012
  90. 4/4 git-rebase: add keep_empty flagNeil Horman, Apr 17, 2012
  91. Clemens BuchacherApr 17, 2012
  92. Neil HormanApr 18, 2012
  93. Junio C HamanoApr 18, 2012
  94. Neil HormanApr 19, 2012
  95. Junio C HamanoApr 19, 2012
  96. 0/4 Enhance git-rebases flexibiilty in handling empty commitsNeil Horman, Apr 18, 2012
  97. 1/4 git-cherry-pick: add allow-empty optionNeil Horman, Apr 18, 2012
  98. 2/4 git-cherry-pick: Add keep-redundant-commits optionNeil Horman, Apr 18, 2012
  99. Junio C HamanoApr 18, 2012
  100. 3/4 git-cherry-pick: Add test to validate new optionsNeil Horman, Apr 18, 2012
  101. 4/4 git-rebase: add keep_empty flagNeil Horman, Apr 18, 2012
  102. Zbigniew Jędrzejewski-SzmekApr 19, 2012
  103. Thomas RastApr 19, 2012
  104. Zbigniew Jędrzejewski-SzmekApr 19, 2012
  105. Neil HormanApr 19, 2012
  106. Junio C HamanoApr 19, 2012
  107. Junio C HamanoApr 19, 2012
  108. Neil HormanApr 20, 2012
  109. 0/4 Enhance git-rebases flexibiilty in handling empty commitsNeil Horman, Apr 20, 2012
  110. 1/4 git-cherry-pick: add allow-empty optionNeil Horman, Apr 20, 2012
  111. 2/4 git-cherry-pick: Add keep-redundant-commits optionNeil Horman, Apr 20, 2012
  112. Junio C HamanoApr 20, 2012
  113. Neil HormanApr 20, 2012
  114. 3/4 git-cherry-pick: Add test to validate new optionsNeil Horman, Apr 20, 2012
  115. 4/4 git-rebase: add keep_empty flagNeil Horman, Apr 20, 2012
  116. Junio C HamanoApr 25, 2012
  117. Neil HormanApr 25, 2012
  118. Martin von ZweigbergkJul 18, 2012
  119. Johannes SixtJul 18, 2012
  120. Martin von ZweigbergkJul 18, 2012
  121. Neil HormanJul 18, 2012

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.