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

Hook : Sort all hooks following an human listing #1830

Closed
camlafit opened this issue May 29, 2017 · 9 comments
Closed

Hook : Sort all hooks following an human listing #1830

camlafit opened this issue May 29, 2017 · 9 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@camlafit
Copy link
Contributor

Gitea execute hook following a glob listing, in some case this list could be not adapted. Mainly if a hook required to be execute at specific step.

Prefer a $(ls -1 |sort -h) looks useful.

Then with this list : 01-erere ezaezae 02-erezrze 1-zerezr 10-erezrze 2-erezrze 99-ererer

we obtain actually :
01-erere
02-erezrze
10-erezr
1-zerezr
2-erezrze
99-ererer
ezaezae

As we can see 10 is previous 1

Should be better to get this result :
ezaezae
01-erere
1-zerezr
02-erezrze
2-erezrze
10-erezrze
99-ererer

@lunny lunny added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels May 29, 2017
@lunny lunny added this to the 1.x.x milestone May 29, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Jun 11, 2017

This is standard .d behaviour. I don't see how this would be useful TBH :/

Edit: If you need them to be executed in a specific order just prefix them with NN- (where N is a digit)

@camlafit
Copy link
Contributor Author

camlafit commented Jun 11, 2017 via email

@camlafit
Copy link
Contributor Author

camlafit commented Jun 11, 2017

As said on mine examples, NN prefix is not relevant we can have 10 before 1
Why ls with sort could be solve this behavior

@bkcsoft
Copy link
Member

bkcsoft commented Jun 15, 2017

NN prefix works just fine, 01_ is listed before 10_ 🙂

@camlafit
Copy link
Contributor Author

but could be better to have a predictable sort without considerate separator :)
And if I've understood related patch should be small

@bkcsoft
Copy link
Member

bkcsoft commented Jun 19, 2017

But it is predictable. This is literaly how every single conf.d implementation works 😕

@camlafit
Copy link
Contributor Author

camlafit commented Jun 19, 2017 via email

@bkcsoft
Copy link
Member

bkcsoft commented Jun 19, 2017

That does however make sense :)

@warnat
Copy link

warnat commented Sep 12, 2020

can this be closed now, to get gitea forward, please?

@6543 6543 removed this from the 1.x.x milestone Sep 18, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

6 participants