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

Re: [PATCH] rev-parse --git-path: fix output when running in a subdirectory

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 9, 2017, 22:54 UTC
Message-ID
<xmqqwpczm0vj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1702092304250.3496@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
>> I have no strong opinion for or against a "longer term" solution
>> that makes "rev-parse --git-path" behave differently from how it
>> behaves today, but I am not yet convinced that we can reach that
>> longer term goal without a transition period, as I suspect there are
>> existing users that know and came to expect how it behaves, based on
>> its today's behaviour.  Other than that I do not have suggestion on
>> this topic at the moment.

I think I was simply being silly (not merely "overcautious", but just "silly") here.

There is no reason for people to use "--git-path" if they are not preparing to work with secondary worktrees, because the whole point of the feature is so that cases where "$(rev-parse --git-dir)/path" does a wrong thing (e.g. end up referring to the main worktree thing when you need to refer to your own, or vice versa).

> Given that
> ...
> it should be safe to assume that a transitional period is more likely to
> do more harm to our users than bring benefit.

In short, "--git-path as currently exposed to the end-users is utterly broken and cannot have been used for anything sensible". If that is the case, let's just change that with an entry in the release notes that states so (iow, there is no need for even a backward compatibility notice, we just have an entry that says "this was totally broken in such and such way, and now it is fixed to behave this way").

That leaves what the right single-step behaviour change should be. As I recall Duy said something about --common-dir and other things Mike's earlier change also covered, I'd prefer to leave it to three of you to figure out what the final patch should be.

Thanks.
Previous: Johannes SchindelinNext: Mike Rappazzo
Message 11 of 27 in “rev-parse --git-path: fix output when running in a subdirectory”
  1. rev-parse --git-path: fix output when running in a subdirectoryJohannes Schindelin, Feb 8, 2017
  2. Junio C HamanoFeb 8, 2017
  3. Johannes SchindelinFeb 9, 2017
  4. Junio C HamanoFeb 9, 2017
  5. Jeff KingFeb 10, 2017
  6. Duy NguyenFeb 9, 2017
  7. Mike RappazzoFeb 9, 2017
  8. Johannes SchindelinFeb 9, 2017
  9. Junio C HamanoFeb 9, 2017
  10. Johannes SchindelinFeb 9, 2017
  11. Junio C HamanoFeb 9, 2017
  12. Mike RappazzoFeb 10, 2017
  13. Johannes SchindelinFeb 10, 2017
  14. 0/2 Fix bugs in rev-parse's output when run in a subdirectoryJohannes Schindelin, Feb 10, 2017
  15. 2/2 rev-parse: fix several options when running in a subdirectoryJohannes Schindelin, Feb 10, 2017
  16. Junio C HamanoFeb 10, 2017
  17. Johannes SchindelinFeb 17, 2017
  18. 1/2 rev-parse tests: add tests executed from a subdirectoryJohannes Schindelin, Feb 10, 2017
  19. Junio C HamanoFeb 10, 2017
  20. Johannes SchindelinFeb 17, 2017
  21. Junio C HamanoFeb 10, 2017
  22. Johannes SchindelinFeb 17, 2017
  23. Junio C HamanoFeb 10, 2017
  24. 0/2 Fix bugs in rev-parse's output when run in a subdirectoryJohannes Schindelin, Feb 17, 2017
  25. 1/2 rev-parse tests: add tests executed from a subdirectoryJohannes Schindelin, Feb 17, 2017
  26. 2/2 rev-parse: fix several options when running in a subdirectoryJohannes Schindelin, Feb 17, 2017
  27. Junio C HamanoFeb 17, 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.