weird git behavior with this repo

Aberta Para iniciantes
#12,804 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
68/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
git, python, shell

Direção de pesquisa

Comece executando git status e git ls-files no repositório e então inspecione os caminhos rastreados procurando nomes que diferem apenas em maiúsculas e minúsculas; a issue menciona uma solução alternativa em shell/Python usando git update-index --skip-worktree. Nenhum arquivo ou teste específico é indicado. Concluído significa que o repositório não relata mais dezenas de arquivos como modificados antes de qualquer alteração, com todos os caminhos conflitantes identificados e tratados de forma consistente.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Shell
Estrelas
448
Forks
928
Merge médio
16h 17min
PRs com merge (30d)
518

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de AppImage/appimage.github.io

Todas as issues de AppImage/appimage.github.io

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.