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

Re: [PATCH 1/4] git-prompt.sh: add submodule indicator

From
Stefan Beller <sbeller@google.com>
Date
Feb 6, 2017, 04:23 UTC
Message-ID
<CAGZ79kY_1ELUZ2wZwNbQ+HrDnRBM3ngt9HKHKPmvaJEcoAFTtg@mail.gmail.com>
In-Reply-To
<xmqqk29bsz2o.fsf@gitster.mtv.corp.google.com>
On Mon, Jan 30, 2017 at 7:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 50 quoted lines
> Benjamin Fuchs <email@benjaminfuchs.de> writes:
>
>> In [2/4] I got rid of the loop by feedback of Gábor.
>> Sorry if my patch wasn't well formed.
>
> While it might be the way other development communities work, in the
> Git development community, we do not work that way when presenting
> your second and subsequent attempt to the community.
>
> Having the initial draft from the original developers that records
> the bugs and misdesigns in an earlier parts of a series and separate
> patches that record how the problems were fixed to arrive at the
> final shape of the codebase might be interesting to the original
> developers, and they may even find such a history valuable, but in
> the context of the history that will be recorded in the official
> tree of the project for eternity, that just adds useless noise.
>
> Instead of keeping the original, in which problems were pointed out,
> and adding later commits to correct them incrementally, a patch is
> "rerolled".  That is, you are expected to learn from the review
> comments and pretend as if you did the work from scratch and you
> already possessed the wisdom lent by the reviewers when you started
> your work.  In the "rerolled" patches you send, you pretend as if
> you worked without making mistakes you made in the earlier rounds at
> all, producing (more) perfect patches from the beginning.
>
> In reality, you may locally be using Git tools like rebase,
> cherry-pick and "add -p" while preparing these "rerolled" rounds of
> patches, but the name of the game is to hide that effort from the
> public and pretend to be a perfect human, recording the result of
> exercising your best ability in the official history ;-).
>
> So this is OK:
>
>     0/3: I want to improve X, and for that I identified that I need
>     A, B and C done.  A or B alone is already an improvement, but A
>     and B together makes it even more useful, and implementation of
>     C requires patches to do A and B.
>
>     1/3: do A
>     2/3: do B
>     3/3: do C, building on A and B
>
> This is not:
>
>     0/3: I want to improve X, and for that I need to do C.
>     1/3: I couldn't do C, and I did A instead.
>     2/3: A was totally useless. I fix it to do B.
>     3/3: B is not very useful, either. I fix it to do C.
>

I agree with Junio here, "git rebase --interactive" and then editing/squashing commits is your friend.

(unrelated side note:) At GitMerge facebook presented their improvements on mercurial and one of the things was "hg absorb". It would take the dirty hunks/lines of the working tree and amend them into the "stack of commits", i.e. into your local unpublished history. So instead of making fixup commits and doing the whole interactive rebase thing, it would do it automatically for you. I think that is a neat time saver.

Thanks, Stefan

Previous: Junio C HamanoNext: Jacob Keller
Message 51 of 53 in “git-prompt.sh: Full patch for submodule indicator”
  1. 0/4 git-prompt.sh: Full patch for submodule indicatorBenjamin Fuchs, Jan 30, 2017
  2. 3/4 git-prompt.sh: fix for submodule 'dirty' indicatorBenjamin Fuchs, Jan 30, 2017
  3. 4/4 git-prompt.sh: add tests for submodule indicatorBenjamin Fuchs, Jan 30, 2017
  4. SZEDER GáborJan 31, 2017
  5. Junio C HamanoJan 31, 2017
  6. Stefan BellerJan 31, 2017
  7. rev-parse: add --show-superproject-working-treeStefan Beller, Mar 7, 2017
  8. Junio C HamanoMar 7, 2017
  9. Junio C HamanoMar 7, 2017
  10. Junio C HamanoMar 7, 2017
  11. Junio C HamanoMar 7, 2017
  12. Stefan BellerMar 7, 2017
  13. Junio C HamanoMar 7, 2017
  14. [PATCHv2] rev-parse: add --show-superproject-working-treeStefan Beller, Mar 8, 2017
  15. Junio C HamanoMar 8, 2017
  16. [PATCHv3] rev-parse: add --show-superproject-working-treeStefan Beller, Mar 8, 2017
  17. Junio C HamanoMar 8, 2017
  18. [PATCHv4] rev-parse: add --show-superproject-working-treeStefan Beller, Mar 8, 2017
  19. Junio C HamanoMar 8, 2017
  20. Jonathan NiederMar 17, 2017
  21. Documentation/git-worktree: use working tree for trees on the file systemStefan Beller, Mar 17, 2017
  22. Jonathan NiederMar 17, 2017
  23. Stefan BellerMar 17, 2017
  24. Junio C HamanoMar 18, 2017
  25. Junio C HamanoMar 18, 2017
  26. Junio C HamanoMar 18, 2017
  27. Stefan BellerMar 20, 2017
  28. Junio C HamanoMar 20, 2017
  29. Jonathan NiederMar 20, 2017
  30. 0/2 use "working trees" instead of "worktree" in our APIStefan Beller, Mar 20, 2017
  31. 2/2 revparse: introduce --is-inside-working-treeStefan Beller, Mar 20, 2017
  32. Jonathan NiederMar 20, 2017
  33. 1/2 git.c: introduce --working-tree superseding --work-treeStefan Beller, Mar 20, 2017
  34. Jonathan NiederMar 20, 2017
  35. Junio C HamanoMar 20, 2017
  36. Duy NguyenMar 21, 2017
  37. Junio C HamanoMar 21, 2017
  38. Michael J GruberMar 23, 2017
  39. Junio C HamanoMar 23, 2017
  40. Duy NguyenMar 25, 2017
  41. Michael J GruberApr 7, 2017
  42. Jacob KellerApr 7, 2017
  43. Duy NguyenMar 25, 2017
  44. Junio C HamanoMar 8, 2017
  45. 2/4 git-prompt.sh: rework of submodule indicatorBenjamin Fuchs, Jan 30, 2017
  46. SZEDER GáborJan 31, 2017
  47. 1/4 git-prompt.sh: add submodule indicatorBenjamin Fuchs, Jan 30, 2017
  48. Junio C HamanoJan 30, 2017
  49. Benjamin FuchsJan 31, 2017
  50. Junio C HamanoJan 31, 2017
  51. Stefan BellerFeb 6, 2017
  52. Jacob KellerFeb 6, 2017
  53. Stefan BellerFeb 6, 2017

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.