microsoft / microsoft/TypeScript
Add diff chunk header lines to Git
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
Search Terms
userdiff xfuncname
Suggestion
Please add regular expressions to https://github.com/git/git/blob/master/userdiff.c such that TypeScript constructs can be identified in a predictable manner by the Git diff algorithm.
Use Cases
When I do a git diff or git add -p that includes TypeScript code, it's nice to see the function and/or class names of the changed lines I am looking at.
Examples
git diff -- *.tsgit add -p -- *.ts
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
- Particularly "Provide a structuring mechanism for larger pieces of code."
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando userdiff.c di Git, che l’issue identifica come punto di ingresso dell’implementazione, e verifica in che modo i pattern dei linguaggi esistenti espongono i nomi di funzioni o classi nelle intestazioni dei diff. Aggiungi pattern TypeScript per i file .ts, quindi verifica che git diff e git add -p mostrino i nomi dei costrutti pertinenti per gli esempi nell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, typescript
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100