Re: Creating something like increasing revision numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]