[PR #4683] [MERGED] Add whitespace handling to PR-comparsion #17462

Closed
opened 2025-11-02 13:32:38 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4683
Author: @nemoinho
Created: 8/13/2018
Status: Merged
Merged: 8/14/2018
Merged by: @techknowlogick

Base: masterHead: feature/ignore-whitespace


📝 Commits (5)

  • 68df14b Add whitespace handling to PR-comparsion
  • be4c6c3 Remove de-DE translation
  • b4c5d85 Update whitespace option text
  • d8f7767 Optimize dropdown template code to be less verbose
  • 3127f2e Merge branch 'master' into feature/ignore-whitespace

📊 Changes

7 files changed (+91 additions, -15 deletions)

View changed files

📝 models/git_diff.go (+21 -10)
📝 options/locale/locale_en-US.ini (+5 -0)
📝 routers/repo/middlewares.go (+11 -0)
📝 routers/repo/pull.go (+10 -3)
📝 routers/routes/routes.go (+1 -1)
📝 templates/repo/diff/box.tmpl (+20 -1)
templates/repo/diff/whitespace_dropdown.tmpl (+23 -0)

📄 Description

In a PR we have to keep an eye on a lot of different things. But sometimes the bare code is the key-thing we want to care about and just don't want to care about fixed indention on some places. Especially if we follow the pathfinder rule we face a lot of these situations because these changes don't break the code in many languages but improve the readability a lot.

So this change introduce a fine graned button to adjust the way how the reviewer want to see whitespace-changes within the code.

The possibilities reflect the possibilities from git itself except of the --ignore-blank-lines flag because that one is also handled by -b and is really rare.

This solves at least partly #716


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4683 **Author:** [@nemoinho](https://github.com/nemoinho) **Created:** 8/13/2018 **Status:** ✅ Merged **Merged:** 8/14/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `feature/ignore-whitespace` --- ### 📝 Commits (5) - [`68df14b`](https://github.com/go-gitea/gitea/commit/68df14bdad8dceea376cd4b2c2cf631793e95eb2) Add whitespace handling to PR-comparsion - [`be4c6c3`](https://github.com/go-gitea/gitea/commit/be4c6c39e5a76ed332359291756eb5ef9abd62f9) Remove de-DE translation - [`b4c5d85`](https://github.com/go-gitea/gitea/commit/b4c5d8553482b0d5f5f466fb8600c9e995e2267e) Update whitespace option text - [`d8f7767`](https://github.com/go-gitea/gitea/commit/d8f7767b673f143ebf9775d094c2b4154a746e1b) Optimize dropdown template code to be less verbose - [`3127f2e`](https://github.com/go-gitea/gitea/commit/3127f2e1e634148777cdc8c0553e2ee826023dc9) Merge branch 'master' into feature/ignore-whitespace ### 📊 Changes **7 files changed** (+91 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `models/git_diff.go` (+21 -10) 📝 `options/locale/locale_en-US.ini` (+5 -0) 📝 `routers/repo/middlewares.go` (+11 -0) 📝 `routers/repo/pull.go` (+10 -3) 📝 `routers/routes/routes.go` (+1 -1) 📝 `templates/repo/diff/box.tmpl` (+20 -1) ➕ `templates/repo/diff/whitespace_dropdown.tmpl` (+23 -0) </details> ### 📄 Description In a PR we have to keep an eye on a lot of different things. But sometimes the bare code is the key-thing we want to care about and just don't want to care about fixed indention on some places. Especially if we follow the pathfinder rule we face a lot of these situations because these changes don't break the code in many languages but improve the readability a lot. So this change introduce a fine graned button to adjust the way how the reviewer want to see whitespace-changes within the code. The possibilities reflect the possibilities from git itself except of the `--ignore-blank-lines` flag because that one is also handled by `-b` and is really rare. This solves at least partly #716 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 13:32:38 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17462