jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.93k stars 1.85k forks source link

View stash creation date #3167

Open JoyceBabu opened 10 months ago

JoyceBabu commented 10 months ago

Is your feature request related to a problem? Please describe.

I have several stash entries. It is difficult to find a stash entry I am looking for since the creation date is not visible.

Describe the solution you'd like Would it be possible to add the creation date& time to the stash panel, or add a commit information panel to the right side when a stash is selected.

Describe alternatives you've considered Currently I am falling back to command line git to see the stash date.

Additional context Add any other context or screenshots about the feature request here.

stefanhaller commented 10 months ago

We have this already as #2445, except that it suggests to show the age instead of the date, like for local branches. Would that work for you too, @JoyceBabu?

@glendsoza said they were up for making a PR, but this never happened. Anybody else feel like picking this up? #2445 already contains a patch, so it looks like there's not much work left.

AzraelSec commented 10 months ago

@stefanhaller if nobody else's up for it, I'd pick this up :)

JoyceBabu commented 10 months ago

Age is fine for entries below 1 year. For older entries date is better. It would be great if we could assign a key mapping to switch between relative/absolute dates, along with config option to specify the default format.

stefanhaller commented 10 months ago

Age is fine for entries below 1 year. For older entries date is better.

I think this should be consistent with how we show the age of branches in the branches panel. It would be strange to show the age one way for branches, but another way for stashes.

In both cases, we are a bit space constrained. For branches, the current recency format was chosen so that it never takes up more than 4 characters; I find this important so that there's enough space left for the branch name. The same consideration goes for stashes, even more maybe, because stash titles are often longer than branch names. So I just don't think a date fits in there.

We could consider showing more details in the expanded view (after pressing "+"), but that could be a different PR (and then for both branches and stashes). For this one, I think we should start with showing the age of stashes in exactly the same way as we do for branches.

It would be great if we could assign a key mapping to switch between relative/absolute dates,

Sounds like overkill to me.

AzraelSec commented 10 months ago

@stefanhaller do you prefer to keep this alive as a reference issue for introducing the alternate date format on the expanded view of branches and stash entries, or do you prefer to close it?

stefanhaller commented 10 months ago

No strong opinion, I guess it makes sense to keep it open.