weird git behavior with this repo

Đang mở Phù hợp với người mới
#12,804 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, python, shell

Hướng nghiên cứu

Bắt đầu bằng cách chạy git status và git ls-files trong kho lưu trữ, sau đó kiểm tra các đường dẫn được theo dõi để tìm tên chỉ khác nhau ở chữ hoa chữ thường; issue đề cập đến cách giải quyết tạm thời bằng shell/Python sử dụng git update-index --skip-worktree. Không tệp hoặc bài kiểm tra cụ thể nào được nêu. Hoàn thành nghĩa là kho lưu trữ không còn báo hàng chục tệp là đã sửa đổi trước khi có bất kỳ thay đổi nào, đồng thời mọi đường dẫn xung đột đều được xác định và xử lý nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

For some reason, this repository specifically, triggers git status to believe that dozens of files are modified, even before I make any changes.

I'm having to work around this quirk with Gemini generated shell commands:

git ls-files -z | python3 -c '
import sys, subprocess
from collections import defaultdict

paths = [p.decode() for p in sys.stdin.buffer.read().split(b"\0") if p]
by_low = defaultdict(list)
for p in paths:
    by_low[p.lower()].append(p)

targets = [p for group in by_low.values() if len(group) > 1 for p in group]
for i in range(0, len(targets), 20):
    batch = targets[i:i+20]
    subprocess.run(["git", "update-index", "--skip-worktree", *batch], check=True)

print(f"Updated {len(targets)} paths")
'

Never had this problem when forking and contributing to any other repo, just AppImage/appimage.github.io.

I tried all manner of gentler commands to fix git status, such as git restore ., with no effect.

Curious if we may have a casing issue with some of the files in the repo. It's not good form to have multiple sibling file paths that differ only in case. If so, then we need to incrementally select more unique filenames for each of the conflicts.

zsh on macOS, in case that matters.

% cat ~/.gitconfig
[core]
        editor = vi
        excludesfile = /Users/andrew/.gitignore-global
        ignorecase = false

[push]
        default = simple

[branch]
        autosetuprebase = always

# [color]
#       ui = auto

[merge]
        ff = true

[pull]
        rebase = true

[mergetool]
        keepBackup = false

[user]
        name = Andrew Pennebaker
        email = [email protected]
        signingkey = 8E363EAD6BBCDCBC

[init]
        defaultBranch = main
[commit]
        gpgsign = true
[tag]
        gpgSign = true
[log]
        showSignature = true
Ngôn ngữ chính
Shell
Star
448
Fork
928
Merge trung bình
16 giờ 17 phút
Pull request đã merge (30 ngày)
518

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AppImage/appimage.github.io

Tất cả issue của AppImage/appimage.github.io

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.