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

Re: Salvaging borked project history

From
MMason <slash.tmp@free.fr>
Date
Mar 4, 2015, 14:49 UTC
Message-ID
<54F71B75.7000104@free.fr>
In-Reply-To
<54EF814D.1020105@free.fr>
Mason wrote:
> I was planning to write 'git diff -q commit^ commit'
> to test for empty commits. Looks like I'll be needing
> 'git diff commit^ commit | wc -l' instead?
I wrote a script to generate the list of empty commits.
git log --format="%h" --reverse 413cb08.. | while read H
do
   if git diff --quiet $H^ $H; then echo $H; fi
done >empty_commits

But it turns out all this is unnecessary, as git-rebase will automatically filter empty commits! :-) Unless given the --keep-empty option, I presume.

Thanks to everyone involved in making this great tool.
Regards.
Previous: Junio C Hamano
Message 9 of 9 in “Salvaging borked project history”
  1. MasonFeb 23, 2015
  2. Junio C HamanoFeb 23, 2015
  3. MasonFeb 26, 2015
  4. Junio C HamanoFeb 26, 2015
  5. MasonFeb 26, 2015
  6. Junio C HamanoFeb 26, 2015
  7. MasonFeb 26, 2015
  8. Junio C HamanoFeb 26, 2015
  9. MasonMar 4, 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.