git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Webster <chris@webstech.net>
To: Jeff King <peff@peff.net>
Cc: "Chris. Webster via GitGitGadget" <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] ci: github action - add check for whitespace errors
Date: Thu, 24 Sep 2020 22:10:16 -0700	[thread overview]
Message-ID: <CAGT1KpU6zkvr9QQQqez6x1cVsvhxmkU9gG5T0QYC8yCgnOPN1Q@mail.gmail.com> (raw)
In-Reply-To: <20200924065129.GB1851751@coredump.intra.peff.net>

On Wed, Sep 23, 2020 at 11:51 PM Jeff King <peff@peff.net> wrote:
>   git clone --shallow-exclude=HEAD --single-branch -b $branch
>   git log --check
>
> _almost_ works. The problem is that the shallow graft means that the
> bottom commit looks like it introduces every file. We really want to
> graft at HEAD^, but the server side only accepts exact refnames. You
> could work around it with a followup:
>
>   git fetch --deepen 1

Thanks for the other possibilities (I have much to learn).  The first
step to increase the commit count is addressing this very problem.

> 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.

The original push solution pulled an arbitrary depth knowing
GitGitGadget had a limit of 30 commits and then limited the check to
post merge commits, again knowing merges were flagged.  Not pretty but
workable in the confines of the GitGitGadget workflow.

A generic push solution (with an opt out?) could be a separate file or
replace this (yea).

I appreciate the feedback,
...chris.

  reply	other threads:[~2020-09-25  5:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22  7:28 [PATCH] ci: github action - add check for whitespace errors Chris. Webster via GitGitGadget
2020-09-22 17:07 ` Jeff King
2020-09-22 17:55   ` Junio C Hamano
2020-09-22 22:41     ` Chris Webster
2020-10-09  5:00       ` Chris Webster
2020-10-09 13:20         ` Johannes Schindelin
2020-10-09 16:23           ` Junio C Hamano
2020-10-09 17:59             ` Jeff King
2020-10-09 18:13               ` Junio C Hamano
2020-10-09 18:18                 ` Jeff King
2020-10-09 18:56                   ` Junio C Hamano
2020-10-10  5:26                     ` Chris Webster
2020-10-10  6:29                       ` Junio C Hamano
2020-09-22 22:17   ` Chris Webster
2020-09-24  6:51     ` Jeff King
2020-09-25  5:10       ` Chris Webster [this message]
2020-09-25  6:44         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGT1KpU6zkvr9QQQqez6x1cVsvhxmkU9gG5T0QYC8yCgnOPN1Q@mail.gmail.com \
    --to=chris@webstech.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).