8000 Bug with long pathnames by tongson · Pull Request #79 · miekg/gitopper · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug with long pathnames #79

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

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Bug with long pathnames #79

merged 1 commit into from
Aug 24, 2024

Conversation

tongson
Copy link
Contributor
@tongson tongson commented Aug 24, 2024

There is a bug with paths longer than 80 characters. When running git pull --stat for changes with these long paths. You get a truncated path:

.../deeply/nested/directory/hierarchy/this.service | 6 +++---

This will not match the set dir in the gitopper configuration.

Unfortunately you cannot set the maximum width in git pull --stat but possible with git diff --stat. We have to separate the steps when checking for changes. That is, git fetch, git diff, then git merge. The default kernel-imposed limit in Linux is 4096 so just use that too.

It does git diff now so we can also set --name-only to get a clean output for string matching. We can skip matching the path inside the git pull --stat output format.

…t pull --stat` for changes with these long paths. You get a truncated path:

```
.../deeply/nested/directory/hierarchy/this.service | 6 +++---
```

This will not match the set `dir` in the gitopper configuration.

Unfortunately you cannot set the maximum width in `git pull --stat` but possible with `git diff --stat`. We have to separate the steps when checking for changes. That is, `git fetch`, `git diff`, then `git merge`. The default kernel-imposed limit in Linux is 4096 so just use that too.

It does `git diff` now so we can also set `--name-only` to get a clean output for string matching. We can skip matching the path inside the `git pull --stat` output format.
@miekg miekg merged commit decbce2 into miekg:main Aug 24, 2024
1 check passed
@miekg
Copy link
Owner
miekg commented Aug 24, 2024

haha, of course git does this.. thanks for the patch

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.

2 participants
0