+
Skip to content

GitSVN: Multi line support of ignore-path, include-paths and skiping of empty commits #834

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lukaspupkalipinski
Copy link

@lukaspupkalipinski lukaspupkalipinski commented Aug 18, 2020

[PATCH]v3 GitSVN: Multi line support of ignore-path, include-paths and skiping of empty commits

I used the ignore-paths option to ignore a lot of stuff I don’t need. The ignore pattern works well, but it could and up in empty commits. So just the message without any modifications / changes. The patch below skip a commit if all changes are ignored by the ignore-paths option. In order to use this feature I includes the option to read configuration for ignore-path, include-paths in several lines. So that the user is not limited by the max. char. per line definition.
In Addition this patch includes the optimizations which are mansion from your side.

Regarding the subrouties comments i oriented by this example: https://www.perlmonks.org/?node_id=29905

Changes in v3:

  • Changed the code format (spaces etc.)
  • Wrap reg-expression by (?:<expression1>|<expression2>)
  • Removed useless variable init
  • Removed useless check.

@gitgitgadget-git
Copy link

Welcome to GitGitGadget

Hi @lukaspupkalipinski, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests.

Please make sure that your Pull Request has a good description, as it will be used as cover letter.

Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:

  • the lines should not exceed 76 columns,
  • the first line should be like a header and typically start with a prefix like "tests:" or "commit:", and
  • the commit messages' body should be describing the "why?" of the change.
  • Finally, the commit messages should end in a Signed-off-by: line matching the commits' author.

It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code.

Contributing the patches

Before you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a comment to your PR of the form /allow. A good way to find other contributors is to locate recent pull requests where someone has been /allowed:

Both the person who commented /allow and the PR author are able to /allow you.

An alternative is the channel #git-devel on the FreeNode IRC network:

<newcontributor> I've just created my first PR, could someone please /allow me? https://github.com/gitgitgadget/git/pull/12345
<veteran> newcontributor: it is done
<newcontributor> thanks!

Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment /submit.

If you want to see what email(s) would be sent for a /submit request, add a PR comment /preview to have the email(s) sent to you. You must have a public GitHub email address for this.

After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions (while the comments and suggestions will be mirrored into the PR by GitGitGadget, you will still want to reply via mail).

If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox from the Git mailing list archive (click the (raw) link), then import it into your mail program. If you use GMail, you can do this via:

curl -g --user "<EMailAddress>:<Password>" \
    --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt

To iterate on your change, i.e. send a revised patch or patch series, you will first want to (force-)push to the same branch. You probably also want to modify your Pull Request description (or title). It is a good idea to summarize the revision by adding something like this to the cover letter (read: by editing the first comment on the PR, i.e. the PR description):

Changes since v1:
- Fixed a typo in the commit message (found by ...)
- Added a code comment to ... as suggested by ...
...

To send a new iteration, just add another PR comment with the contents: /submit.

Need help?

New contributors who want advice are encouraged to join git-mentoring@googlegroups.com, where volunteers who regularly contribute to Git are willing to answer newbie questions, give advice, or otherwise provide mentoring to interested contributors. You must join in order to post or view messages, but anyone can join.

You may also be able to find help in real time in the developer IRC channel, #git-devel on Freenode. Remember that IRC does not support offline messaging, so if you send someone a private message and log out, they cannot respond to you. The scrollback of #git-devel is archived, though.

@gitgitgadget-git
Copy link

There is a merge commit in this Pull Request:

9ec949b9d5901342760de75a235941afab50e474

Please rebase the branch and force-push.

@gitgitgadget-git
Copy link

Error: User lukaspupkalipinski is not permitted to use GitGitGadget

1 similar comment
@gitgitgadget-git
Copy link

Error: User lukaspupkalipinski is not permitted to use GitGitGadget

@lukaspupkalipinski lukaspupkalipinski changed the title [PATCH]v3 GitSVN: Multi line support of ignore-path, include-paths and skiping of empty commits GitSVN: Multi line support of ignore-path, include-paths and skiping of empty commits Aug 18, 2020
@gitgitgadget-git
Copy link

Error: User lukaspupkalipinski is not permitted to use GitGitGadget

1 similar comment
@gitgitgadget-git
Copy link

Error: User lukaspupkalipinski is not permitted to use GitGitGadget

}
return 1;
}
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no performance changes I see in this commit, but a lot of bogus white-space changes... And no sign-off, and the commit message does not really say what this is about. Please address this.

Copy link
Author

@lukaspupkalipinski lukaspupkalipinski Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done see below. for Soem reason the whole file was had this issue.
By the way could you please add me to the allow list. /allow lukaspupkalipinski
thank you

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use an interactive rebase to turn this into a clean patch? In the Git project, no patch series is accepted that introduces a bug that is fixed in the same patch series.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see now that some other parts of the file had also the whitespace issue. ma it would be better to extract that in a separate commit. what do you think?

@roicruz00

This comment has been minimized.

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commits still seem to contain too many independent changes, and the commit messages in particular read very different from what the Git project prefers.

See https://git-scm.com/docs/SubmittingPatches#describe-changes for some guidance, and 94b2ee1 for an example how a commit message should look like.


=cut

############################################################
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it is nice that you add documentation, this is a different concern than multi-line support of ignore-path. Those concerns need to be split into separate commits, see https://git-scm.com/docs/git-rebase#_splitting_commits how to do that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please take a look.
thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you pushed the changed branch yet?

$_placeholder_filename @deleted_gpath %added_placeholder
$repo_id/;
$_placeholder_filename @deleted_gpath %added_placeholder
$repo_id/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really sure that this is a good idea: white-space cleanup is a good thing under certain circumstances, but I am not even certain that the new indentation matches Git's coding conventions better than the old indentation.

@lukaspupkalipinski
Copy link
Author

/submit

@gitgitgadget-git
Copy link

There is an issue in commit d38d811:
Prefixed commit message must be in lower case: added: Multi line support for ignore-paths

@gitgitgadget-git
Copy link

There is an issue in commit 0769f5b:
Prefixed commit message must be in lower case: added: Skip commit if all files are ignored

@gitgitgadget-git
Copy link

Error: User lukaspupkalipinski is not permitted to use GitGitGadget

@dscho
Copy link
Member

dscho commented Sep 7, 2020

I would highly recommend using the prefix svn: instead of the prefix added:, as the former conveys a much better piece of information.

Also, please continue in lower-case after the colon, e.g. svn: add support for multi-line ignore-paths.

Further, please to take care to wrap the commit messages at <=76 columns per line. The Git project is very particular about commit messages, and your contribution will find a lot more interest when the commit messages are crafted with care, imitating the style of the existing commits (for example, I would leave out "as you know", that's more likely to irk reviewers than to amuse them).

@dscho
Copy link
Member

dscho commented Sep 7, 2020

/allow

@gitgitgadget-git
Copy link

User lukaspupkalipinski is now allowed to use GitGitGadget.

WARNING: lukaspupkalipinski has no public email address set on GitHub

Lukas added 2 commits September 11, 2020 08:46
With this change ths user is able to ignore more than a couple of folder.
The git configuration has a max char length per line, so the user is limited if he want to ignor many folders/files.
With this patch the ignore-paths expression is generated by all given lines.
Example:
ignore-paths=.*/somefolder1/
ignore-paths=base/differentfolder2/.*

Signed-off-by: Lukas Pupka-Lipinski <lukas.pupkalipinski@lpl-mind.de>
I used the ignore-paths option to ignore a lot of stuff I don’t need.
The ignore pattern works well, but it could and up in empty commits.
So just the message without any modifications / changes.
The patch below skip a commit if all changes are ignored by the ignore-paths option.
In order to use this feature I includes the option to read configuration for ignore-path, include-paths in several lines.
So that the user is not limited by the max. char. per line definition.

Signed-off-by: Lukas Pupka-Lipinski <lukas.pupkalipinski@lpl-mind.de>
@lukaspupkalipinski
Copy link
Author

/submit

@gitgitgadget-git
Copy link

Error: Could not determine full name of lukaspupkalipinski

@lukaspupkalipinski
Copy link
Author

/submit

@gitgitgadget-git
Copy link

Submitted as pull.834.git.git.1599811217.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git pr-git-834/lukaspupkalipinski/master-v1

To fetch this version to local tag pr-git-834/lukaspupkalipinski/master-v1:

git fetch --no-tags https://github.com/gitgitgadget/git tag pr-git-834/lukaspupkalipinski/master-v1

WARNING: lukaspupkalipinski has no public email address set on GitHub

@webstech
Copy link
Contributor

webstech commented Feb 1, 2021

Is there still interest in this change? The user repo is gone (not that it is needed at this point).

@dscho
Copy link
Member

dscho commented Feb 2, 2021

I guess @lukaspupkalipinski could reply to the contribution with a ping, potentially Cc:ing Eric Wong, the git svn maintainer.

If there is feedback that requires changes, the absence of the original fork will be a problem.

@dscho
Copy link
Member

dscho commented Feb 6, 2021

I guess we should close this :-(

@pddshk
Copy link

pddshk commented Jul 17, 2025

Is there still interest in this change? The user repo is gone (not that it is needed at this point).

There is interest, I guess small, but I am interested in this. Maybe I can pick this up. I'll take a look in a while

@pddshk
Copy link

pddshk commented Jul 18, 2025

I wonder if it is a good idea to craft 100+ lines regex if there is exact list of files to ignore and it is too large. In this case it may prove useful to read ignored files from file. And the last but not least: we can craft list of files to fetch ahead of time, before fetching and skip empty commits (should also be configurable) if the list is empty

@bobibehi
Copy link

bobibehi commented Jul 19, 2025 via email

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

Successfully merging this pull request may close these issues.

6 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载