git/Documentation
Elijah Newren b9cbd2958f rebase: reinstate --no-keep-empty
Commit d48e5e21da ("rebase (interactive-backend): make --keep-empty the
default", 2020-02-15) turned --keep-empty (for keeping commits which
start empty) into the default.  The logic underpinning that commit was:

  1) 'git commit' errors out on the creation of empty commits without an
     override flag
  2) Once someone determines that the override is worthwhile, it's
     annoying and/or harmful to required them to take extra steps in
     order to keep such commits around (and to repeat such steps with
     every rebase).

While the logic on which the decision was made is sound, the result was
a bit of an overcorrection.  Instead of jumping to having --keep-empty
being the default, it jumped to making --keep-empty the only available
behavior.  There was a simple workaround, though, which was thought to
be good enough at the time.  People could still drop commits which
started empty the same way the could drop any commits: by firing up an
interactive rebase and picking out the commits they didn't want from the
list.  However, there are cases where external tools might create enough
empty commits that picking all of them out is painful.  As such, having
a flag to automatically remove start-empty commits may be beneficial.

Provide users a way to drop commits which start empty using a flag that
existed for years: --no-keep-empty.  Interpret --keep-empty as
countermanding any previous --no-keep-empty, but otherwise leaving
--keep-empty as the default.

This might lead to some slight weirdness since commands like
  git rebase --empty=drop --keep-empty
  git rebase --empty=keep --no-keep-empty
look really weird despite making perfect sense (the first will drop
commits which become empty, but keep commits that started empty; the
second will keep commits which become empty, but drop commits which
started empty).  However, --no-keep-empty was named years ago and we are
predominantly keeping it for backward compatibility; also we suspect it
will only be used rarely since folks already have a simple way to drop
commits they don't want with an interactive rebase.

Reported-by: Bryan Turner <bturner@atlassian.com>
Reported-by: Sami Boukortt <sami@boukortt.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-11 14:15:52 -07:00
..
RelNotes RelNotes/2.26.0: fix various typos 2020-03-18 15:42:37 -07:00
config Merge branch 'jk/push-option-doc-markup-fix' into maint 2020-03-17 15:02:22 -07:00
howto
technical Merge branch 'jb/multi-pack-index-docfix' into maint 2020-02-14 12:42:33 -08:00
.gitattributes
.gitignore
CodingGuidelines
Makefile
MyFirstContribution.txt MyFirstContribution: rephrase contact info 2020-02-14 09:36:56 -08:00
MyFirstObjectWalk.txt
SubmittingPatches Merge branch 'dl/pretty-reference' 2019-12-10 13:11:43 -08:00
asciidoc.conf
asciidoctor-extensions.rb
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
config.txt color.c: support bright aixterm colors 2020-02-11 11:17:31 -08:00
date-formats.txt
diff-format.txt doc: indent multi-line items in list 2019-12-13 12:18:07 -08:00
diff-generate-patch.txt
diff-options.txt diff-options.txt: avoid "regex" overload in example 2020-02-09 09:25:24 -08:00
doc-diff doc-diff: use single-colon rule in rendering Makefile 2020-02-18 13:53:30 -08:00
docbook-xsl.css
docbook.xsl
everyday.txto
fetch-options.txt Merge branch 'ds/refmap-doc' into maint 2020-02-14 12:42:30 -08:00
fix-texi.perl
git-add.txt add: support the --pathspec-from-file option 2019-12-04 10:10:37 -08:00
git-am.txt am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch 2020-02-20 13:20:41 -08:00
git-annotate.txt
git-apply.txt
git-archimport.txt
git-archive.txt
git-bisect-lk2009.txt Merge branch 'dl/lore-is-the-archive' 2019-12-06 15:09:24 -08:00
git-bisect.txt
git-blame.txt
git-branch.txt
git-bundle.txt Merge branch 'po/bundle-doc-clonable' 2019-12-10 13:11:41 -08:00
git-cat-file.txt
git-check-attr.txt
git-check-ignore.txt Merge branch 'en/check-ignore' into maint 2020-03-17 15:02:23 -07:00
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt checkout, restore: support the --pathspec-from-file option 2019-12-04 10:10:37 -08:00
git-cherry-pick.txt
git-cherry.txt
git-citool.txt
git-clean.txt
git-clone.txt Merge branch 'ja/doc-markup-cleanup' 2019-12-25 11:22:00 -08:00
git-column.txt
git-commit-graph.txt commit-graph.h: store an odb in 'struct write_commit_graph_context' 2020-02-04 11:36:37 -08:00
git-commit-tree.txt doc: move author and committer information to git-commit(1) 2020-01-22 12:27:08 -08:00
git-commit.txt doc: provide guidance on user.name format 2020-01-22 12:27:08 -08:00
git-config.txt config: add '--show-scope' to print the scope of a config value 2020-02-10 10:49:12 -08:00
git-count-objects.txt
git-credential-cache--daemon.txt
git-credential-cache.txt
git-credential-store.txt
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt
git-daemon.txt
git-describe.txt
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt
git-difftool.txt
git-fast-export.txt
git-fast-import.txt Sync with 2.23.1 2019-12-06 16:31:39 +01:00
git-fetch-pack.txt
git-fetch.txt
git-filter-branch.txt git-filter-branch.txt: wrap "maths" notation in backticks 2020-02-04 12:17:18 -08:00
git-fmt-merge-msg.txt
git-for-each-ref.txt
git-format-patch.txt format-patch: teach --no-base 2019-12-05 06:06:18 -08:00
git-fsck-objects.txt
git-fsck.txt
git-gc.txt
git-get-tar-commit-id.txt
git-grep.txt Merge branch 'mt/threaded-grep-in-object-store' 2020-02-14 12:54:20 -08:00
git-gui.txt
git-hash-object.txt
git-help.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt
git-index-pack.txt
git-init-db.txt
git-init.txt
git-instaweb.txt
git-interpret-trailers.txt
git-log.txt Merge branch 'pb/clarify-line-log-doc' 2020-01-06 14:17:50 -08:00
git-ls-files.txt
git-ls-remote.txt Merge branch 'jc/doc-single-h-is-for-help' into maint 2020-03-17 15:02:24 -07:00
git-ls-tree.txt
git-mailinfo.txt
git-mailsplit.txt
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt
git-mergetool--lib.txt
git-mergetool.txt
git-mktag.txt
git-mktree.txt
git-multi-pack-index.txt
git-mv.txt
git-name-rev.txt
git-notes.txt
git-p4.txt
git-pack-objects.txt
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt
git-prune-packed.txt
git-prune.txt
git-pull.txt
git-push.txt
git-quiltimport.txt
git-range-diff.txt Merge branch 'dl/range-diff-with-notes' 2019-12-05 12:52:44 -08:00
git-read-tree.txt
git-rebase.txt rebase: reinstate --no-keep-empty 2020-04-11 14:15:52 -07:00
git-receive-pack.txt
git-reflog.txt
git-remote-ext.txt
git-remote-fd.txt
git-remote-helpers.txto
git-remote.txt
git-repack.txt
git-replace.txt
git-request-pull.txt
git-rerere.txt
git-reset.txt
git-restore.txt checkout, restore: support the --pathspec-from-file option 2019-12-04 10:10:37 -08:00
git-rev-list.txt
git-rev-parse.txt
git-revert.txt
git-rm.txt rm: support the --pathspec-from-file option 2020-02-19 10:56:49 -08:00
git-send-email.txt
git-send-pack.txt
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt
git-show-branch.txt
git-show-index.txt
git-show-ref.txt
git-show.txt
git-sparse-checkout.txt Merge branch 'ds/sparse-add' 2020-03-05 10:43:02 -08:00
git-stage.txt
git-stash.txt stash push: support the --pathspec-from-file option 2020-02-19 10:56:49 -08:00
git-status.txt
git-stripspace.txt
git-submodule.txt Merge branch 'es/recursive-single-branch-clone' 2020-03-05 10:43:03 -08:00
git-svn.txt
git-switch.txt
git-symbolic-ref.txt
git-tag.txt
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt doc: dissuade users from trying to ignore tracked files 2020-01-22 12:27:49 -08:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt
git-whatchanged.txt
git-worktree.txt
git-write-tree.txt
git.txt Merge branch 'hw/doc-git-dir' 2020-02-12 12:41:36 -08:00
gitattributes.txt
gitcli.txt Merge branch 'jc/doc-single-h-is-for-help' into maint 2020-03-17 15:02:24 -07:00
gitcore-tutorial.txt doc/gitcore-tutorial: fix prose to match example command 2020-01-08 08:56:40 -08:00
gitcredentials.txt Merge branch 'bc/wildcard-credential' 2020-03-05 10:43:02 -08:00
gitcvs-migration.txt
gitdiffcore.txt
giteveryday.txt
gitglossary.txt
githooks.txt fsmonitor: update documentation for hook version and watchman hooks 2020-01-23 15:10:23 -08:00
gitignore.txt
gitk.txt doc: log, gitk: line-log arguments must exist in starting revision 2019-12-26 11:00:15 -08:00
gitmodules.txt Merge branch 'pb/submodule-doc-xref' 2019-12-25 11:21:59 -08:00
gitnamespaces.txt
gitremote-helpers.txt
gitrepository-layout.txt
gitrevisions.txt
gitsubmodules.txt
gittutorial-2.txt
gittutorial.txt
gitweb.conf.txt
gitweb.txt
gitworkflows.txt
glossary-content.txt
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
lint-gitlink.perl
mailmap.txt
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
manpage.xsl
merge-options.txt
merge-strategies.txt
pretty-formats.txt Merge branch 'hi/gpg-mintrustlevel' 2020-01-30 14:17:08 -08:00
pretty-options.txt Merge branch 'dl/pretty-reference' 2019-12-10 13:11:43 -08:00
pull-fetch-param.txt
rev-list-options.txt Merge branch 'dl/pretty-reference' 2019-12-10 13:11:43 -08:00
revisions.txt
sequencer.txt
texi.xsl
trace2-target-values.txt
transfer-data-leaks.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt Merge branch 'dl/lore-is-the-archive' 2019-12-06 15:09:24 -08:00