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

Request for getLatestCommits(int commitsBack) method #104

Open
webbby opened this issue Mar 26, 2025 · 0 comments
Open

Request for getLatestCommits(int commitsBack) method #104

webbby opened this issue Mar 26, 2025 · 0 comments

Comments

@webbby
Copy link

webbby commented Mar 26, 2025

There are cases where a user:A commits and wants to get the commit meta immediately after the operation.
However under race conditions another user:B commits as well before user:A acquires the meta data.
Thus by the time user:A executes $commitId = $repo->getLastCommitId() the last commit pointer is moved and user:A receives the commitId of user:B commit.

Please, if possible, provide any of these methods. Any of them would work:

$commitsBack = 10; // if commits number is smaller than 10 get all available
$commitIdsArray = $repo->getLatestCommitIds($commitsBack); // returns array of commit_ids 
// or
$commitsArray = $repo->getLatestCommits($commitsBack); // returns array of Commit:class instances 

Thank you in advance

@webbby webbby changed the title Request for getLatestCommits() method Request for getLatestCommits(int commitsBack) method Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant