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

Itches with the current rev spec

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Apr 25, 2013, 05:07 UTC
Message-ID
<CALkWK0n97VLtiR96VEy86645NVoDL2rS-g7LBuLb=JpncdH6VA@mail.gmail.com>
Hi,
So, I have three serious itches that would be nice to address:
1. git reset --hard HEAD~1/ git show HEAD~1 is a very common idiom
that's unnecessarily cumbersome to type out.  We can make the <rev>
part of <rev>~<n> optional without being ambiguous: you might argue
that ~<n> normally refers to a /home/<n>, but who uses numbers in
place of usernames?  Even if they do, how can that path possibly be
inside our repository?
2. git rebase -i master fails unless I've rebased my branch on top of
master.  I always wished I could do the equivalent of 'git rebase -i
master..', but I can't.  Can we give the A..B syntax a new meaning in
the context of rebase, namely $(git merge-base A B)?  No, this is not
similar to the current diff A..B at all: first, we don't operate on
two endpoints (so 'git rebase -i A B' is nonsensical, and only the
'git rebase -i A ^B'/ 'git rebase -i ^A B' should be handled as
special cases); second, we're trying to be consistent with the
end-result meaning of A..B in ranged-commands like log (as opposed to
diff, which is being inconsistent).
3. Even though I lashed out strongly against 'git diff A..B' because
of inconsistency, I can't say that it's not useful (omit specifying
HEAD on one side).  If we were to start over today, I would argue that
'git diff A ^B' and 'git diff B ^A' be handled as special cases to
mean 'git diff B $(git merge-base A B)' and 'git diff $(git merge-base
A B) B' respectively.  The normal 'git diff A B' should have nothing
to do with this.  Plus, 'git diff A...B' is really an eyesore.  So I
ask again: what can be done to improve the situation?
Thanks.
Next: Ramkumar Ramachandra
Message 1 of 24 in “Itches with the current rev spec”
  1. Ramkumar RamachandraApr 25, 2013
  2. Ramkumar RamachandraApr 25, 2013
  3. Matthieu MoyApr 25, 2013
  4. Felipe ContrerasApr 25, 2013
  5. Ramkumar RamachandraApr 25, 2013
  6. Michael J GruberApr 29, 2013
  7. Andreas SchwabApr 25, 2013
  8. Ramkumar RamachandraApr 25, 2013
  9. Phil HordApr 25, 2013
  10. Yann DirsonApr 26, 2013
  11. Johannes SixtApr 26, 2013
  12. Ramkumar RamachandraApr 26, 2013
  13. Junio C HamanoApr 26, 2013
  14. Felipe ContrerasApr 26, 2013
  15. Junio C HamanoApr 26, 2013
  16. Ramkumar RamachandraApr 29, 2013
  17. Yann DirsonApr 29, 2013
  18. Junio C HamanoApr 29, 2013
  19. Ramkumar RamachandraApr 29, 2013
  20. Junio C HamanoApr 29, 2013
  21. Ramkumar RamachandraApr 29, 2013
  22. Ramkumar RamachandraApr 29, 2013
  23. Junio C HamanoApr 30, 2013
  24. Ramkumar RamachandraApr 29, 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.