git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] ci: github action - add check for whitespace errors

From
Jeff King <peff@peff.net>
Date
Sep 25, 2020, 06:44 UTC
Message-ID
<20200925064459.GA3179383@coredump.intra.peff.net>
In-Reply-To
<CAGT1KpU6zkvr9QQQqez6x1cVsvhxmkU9gG5T0QYC8yCgnOPN1Q@mail.gmail.com>
On Thu, Sep 24, 2020 at 10:10:16PM -0700, Chris Webster wrote:
Show 11 quoted lines
> > Definitely not worth
> > it compared to your solution for a PR, but maybe worth it if it lets us
> > do the same thing for arbitrary branches.
> 
> The PR solution works because fixed values are available from GitHub
> (both repos are present and accounted for).  A push action for
> branches could have issues with the state of the GitHub repo versus
> the local repo.  What happens if the base branch is not current on
> GitHub?  Is HEAD reliable? What if the branch has been re-used with a
> back-merge? How do you limit the check in this case?  Based on my
> demonstrated lack of knowledge these concerns may be addressable.

Hmm, good points. The case I was most worried about was branches based on older points in history, but as long as master keeps moving forward, we'd be OK there (at least in the local case where we have all of the commits; not sure about the shallow-exclude I mentioned above).

And in the case of git.git, I think we're pretty safe. "master" gets pushed along with "seen". But not necessarily so in other repositories. If I base a new topic on Junio's "master" and then push it up, it may be far ahead of my "master" (and in fact, I don't even have a "master" in my personal repo).

GGG PRs figure this out because that repo is a fork of git/git, and it looks at the master of the parent repo as the base for the PR. So probably we could do something similar, but this is starting to get rather tricky.

I think you've convinced me that it's not easy to just adapt this to handle any branch. Let's punt on that idea for now (unless somebody feels like digging further on it, of course) and move forward with doing this for the PR case as your patch does.

-Peff
Previous: Chris Webster
Message 17 of 17 in “ci: github action - add check for whitespace errors”
  1. ci: github action - add check for whitespace errorsChris. Webster via GitGitGadget, Sep 22, 2020
  2. Jeff KingSep 22, 2020
  3. Junio C HamanoSep 22, 2020
  4. Chris WebsterSep 22, 2020
  5. Chris WebsterOct 9, 2020
  6. Johannes SchindelinOct 9, 2020
  7. Junio C HamanoOct 9, 2020
  8. Jeff KingOct 9, 2020
  9. Junio C HamanoOct 9, 2020
  10. Jeff KingOct 9, 2020
  11. Junio C HamanoOct 9, 2020
  12. Chris WebsterOct 10, 2020
  13. Junio C HamanoOct 10, 2020
  14. Chris WebsterSep 22, 2020
  15. Jeff KingSep 24, 2020
  16. Chris WebsterSep 25, 2020
  17. Jeff KingSep 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.