Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch recency is sometimes miscalculated #3538

Open
jorgheymans opened this issue Apr 29, 2024 · 6 comments
Open

branch recency is sometimes miscalculated #3538

jorgheymans opened this issue Apr 29, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@jorgheymans
Copy link

Describe the bug
For a branch i just created, lazygit shows 1W

To Reproduce
Create a branch, then checkout the main branch again to see the age of branch.

Screenshots
image

Version info:
commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=linux, arch=amd64, git version=2.43.2

@jorgheymans jorgheymans added the bug Something isn't working label Apr 29, 2024
@stefanhaller
Copy link
Collaborator

I suspect you sort your branches by date? In that case, lazygit shows the age of the tip commit of the branch, based on its committer date. I suspect that commit was simply made a week ago.

You can also sort your branches by recency, in that case the age shown is when you had the branch checked out last. In this case you'd expect to see 1m or something like that.

I prefer to sort by date rather than recency though, I find it more useful.

@jorgheymans
Copy link
Author

jorgheymans commented Apr 29, 2024

The last commit on that branch was just now, so that could not be it.

image

@stefanhaller
Copy link
Collaborator

So you do sort by recency? Is the value correct if you sort by date?

@jorgheymans
Copy link
Author

Indeed, when sorting on date it's correctly showing 55m. But sorting on recency the indicator seems wrong then. There is only one commit on that branch. The branch was created just now, and i had it checked out upon creation.

@stefanhaller
Copy link
Collaborator

OK, so there seems to be something wrong with the recency calculation. I'm sorry, but I don't care enough about this to look into it (too many other things to do). As I said, I recommend to sort by date (and I personally think it should be the default).

@jorgheymans
Copy link
Author

I agree it makes for a better default. I don't know why i had it set to recency. I checked other repositories I have and there the recency seems correct. Thanks for the feedback.

@jorgheymans jorgheymans changed the title the branch age seems wrong branch recency is sometimes miscalculated Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants