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

Re: Creating something like increasing revision numbers

From
Nicolas Pitre <nico@fluxnic.net>
Date
Oct 19, 2009, 01:34 UTC
Message-ID
<alpine.LFD.2.00.0910182122100.21739@xanadu.home>
In-Reply-To
<20091019004447.GC11739@gamma.logic.tuwien.ac.at>
On Mon, 19 Oct 2009, Norbert Preining wrote:
> Now my follow-up questions:
> - how would one access this "sequence" number on the server
you can count how many commits the server has: git rev-list HEAD | wc -l
> - is there a way to determine at which of this "sequence" numbers a specific
>   file has been changed last?

You can do: git log <path/filename>. That would give you a list of commits that touched that file. But to find out which commit "number" it is you could do:

	git rev-list $(git rev-list -1 HEAD <path/file>) | wc -l

Again, that is true for a particular repository only and may give a different result in another repository with a different state even for the same commit.

However, given what you want to do is really to stick to the SVN way of doing things, then why don't you simply stay with SVN? Git works in a fundamentally different way than SVN, and if you aren't willing/able to change your workflow away from the SVN way then there is really not much for you to gain by switching to Git.

Nicolas
Previous: Daniel BarkalowNext: Norbert Preining
Message 20 of 23 in “Creating something like increasing revision numbers”
  1. Norbert PreiningOct 18, 2009
  2. Johan HerlandOct 18, 2009
  3. Norbert PreiningOct 18, 2009
  4. Johan HerlandOct 18, 2009
  5. alexandrulOct 18, 2009
  6. Nicolas PitreOct 19, 2009
  7. Junio C HamanoOct 18, 2009
  8. Norbert PreiningOct 19, 2009
  9. alexandrulOct 18, 2009
  10. demerphqOct 18, 2009
  11. Norbert PreiningOct 18, 2009
  12. demerphqOct 18, 2009
  13. alexandrulOct 18, 2009
  14. Jon SmirlOct 18, 2009
  15. Daniel BarkalowOct 18, 2009
  16. Norbert PreiningOct 19, 2009
  17. Daniel BarkalowOct 19, 2009
  18. Norbert PreiningOct 19, 2009
  19. Daniel BarkalowOct 19, 2009
  20. Nicolas PitreOct 19, 2009
  21. Norbert PreiningOct 19, 2009
  22. Johannes SixtOct 19, 2009
  23. David AguilarOct 21, 2009

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.