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

Re: [PATCH] rebase -i: fixup fixup! fixup!

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 16, 2013, 01:19 UTC
Message-ID
<7vy5aakg1y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vk3lvlmat.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Andrew Pimlott <andrew@pimlott.net> writes:
>
>> Excerpts from Andrew Pimlott's message of Fri Jun 14 12:31:57 -0700 2013:
>>> It happened to work and I added a test.  But then it occurred to me that
>>> it might have been better to fix commit --fixup/--squash to strip the
>>> fixup! or squash! from the referenced commit in the first place.
>>> Anyhow, below is my patch for --autosquash, but unles someone has an
>>> objection to doing it in commit, I'll work on that.
> ...
> If you strip out the prefix when you make commits, you may lose the
> information if you want to use in order to express these different
> orders.

One design principle I would use as a yardstick is to see any code that deliberately lose information to achieve something as highly suspicious. You can discard extra information when you read and use, if you do not need it, but if you do not record it in the first place, you cannot later enhance the reader to take advantage of it.

In general, whenever you see yourself _discarding_ information to solve an issue, you should carefully ask yourself if that is the right solution.

I wish we can make sure contributors can learn various design principles we have benefited from over the course of this project much better.

But it is a bit difficult to _teach_ others.

Writing them down is difficult, not because the rules are vague, but because they are like air. I am sure regular contributors with good design taste share this sentiment.

You will know a violation of them when you see one, you naturally stick to them yourself without even having to think about them, but enumerating them without seeing concrete issues takes effort.

And this "lets squash multiple --fixup/--squash" happened to realize that "we try not to deliberately lose information" is one of them.

Thanks.
Previous: Junio C HamanoNext: Thomas Rast
Message 6 of 23 in “rebase --autosquash does not handle fixup! of fixup!”
  1. Andrew PimlottJun 11, 2013
  2. Thomas RastJun 11, 2013
  3. rebase -i: fixup fixup! fixup!Andrew Pimlott, Jun 14, 2013
  4. Andrew PimlottJun 15, 2013
  5. Junio C HamanoJun 15, 2013
  6. Junio C HamanoJun 16, 2013
  7. Thomas RastJun 16, 2013
  8. Junio C HamanoJun 17, 2013
  9. Thomas RastJun 17, 2013
  10. Junio C HamanoJun 17, 2013
  11. Andrew PimlottJun 25, 2013
  12. Junio C HamanoJun 25, 2013
  13. Andrew PimlottJun 25, 2013
  14. Junio C HamanoJun 25, 2013
  15. Junio C HamanoJun 25, 2013
  16. Junio C HamanoJun 25, 2013
  17. Andrew PimlottJun 25, 2013
  18. Andrew PimlottJun 26, 2013
  19. Junio C HamanoJun 26, 2013
  20. Andrew PimlottJun 27, 2013
  21. Andrew PimlottJun 27, 2013
  22. Junio C HamanoJun 27, 2013
  23. Andrew PimlottJun 28, 2013

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.