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

[PATCH/RFCv2 0/2] rebase -i : drop command and removed commits

From
Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Date
Jun 1, 2015, 09:57 UTC
Message-ID
<1433152643-4292-1-git-send-email-remi.galan-alfonso@ensimag.grenoble-inp.fr>
 - [PATCH 1/2] git-rebase -i: add command "drop" to remove a commit
The 'drop' command is added as a way to explicitely remove commits in
git rebase -i.
This patch does not prevent users from commenting the line, removing
the line or using the 'noop' command if they want to.
While the 'noop' command has the same effect, it doesn't seem to be
the right use for it since 'noop' merely ignores everything that
follows, in particular writing 'noop <SHA-1> <text>' can be confusing.
Commenting a line also has the same effect but the 2/2 part of the
patch is not made for working correctly with comments (though it still
works with 'noop').
This command is inspired by the command 'drop' in histedit of
Mercurial (though in the idea, it is not made to make migrants from
Mercurial feel better but rather because it seems like a good idea).
For the 'drop' command, maybe instead of just doing the same thing as
noop, checking if the SHA-1 that supposedly follow does exist could be
a good idea.
 - [PATCH 2/2] git rebase -i: warn about removed commits 
Since the default behaviour is 'ignore', meaning that no checking is
done and no warning is displayed, users that are used to remove the
lines to remove a commit can still do so without changing their
configuration.
However this patch gives the user the possibility to avoid silent loss
of information if he wants.
Regarding the comments of v1 : The dupplicated commits are not checked
anymore ((about the review by Eric Sunshine) thus the error case stays
within the warning test, now that we only have one test for warnings).
The list of removed commits is now shown in the format '<short SHA-1>
<commit-message>' instead of '<full SHA-1>', this was done following
an idea given by Matthieu Moy outside of the mailing list. 
Because of this some code have been added and modified and thus need
reviewing.
A test has been added to check the correct behaviour of the error
configuration.
Next: Galan Rémi
Message 1 of 12 in “rebase -i : drop command and removed commits”
  1. 0/2 rebase -i : drop command and removed commitsGalan Rémi, Jun 1, 2015
  2. 1/2 git-rebase -i: add command "drop" to remove a commitGalan Rémi, Jun 1, 2015
  3. Junio C HamanoJun 1, 2015
  4. Matthieu MoyJun 1, 2015
  5. Remi Galan AlfonsoJun 1, 2015
  6. Matthieu MoyJun 1, 2015
  7. Remi Galan AlfonsoJun 2, 2015
  8. Matthieu MoyJun 2, 2015
  9. Junio C HamanoJun 2, 2015
  10. Remi Galan AlfonsoJun 3, 2015
  11. Junio C HamanoJun 3, 2015
  12. 2/2 git rebase -i: warn about removed commitsGalan Rémi, Jun 1, 2015

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.