Re: Feature Proposal: Adding Command for Configuration Diff Between Commits
From: Prince Roshan <hidden>
Date: 2024-10-15 12:45:35
Thanks for the suggestion, but I realized I gave the wrong example. The issue I was referring to is something that's part of .git/config, not .gitmodules, and it can’t be tracked using git diff commit1:.gitmodules commit2:.gitmodules. Apologies for the confusion! I’ll reply to this thread again once I remember the specific problem. Thanks, Prince Roshan On Tue, 15 Oct 2024 at 17:02, Philippe Blain [off-list ref] wrote:
Hi Git Community, Hi ! I wanted to propose a new feature for Git that I believe would be beneficial for repository maintainers and developers alike. What do you think of adding a command like git config diff commit1 commit2 to show the configuration differences between two commits? Git configuration is not tracked in general, so it is not clear what this command would do. This command could display differences in repository configurations (such as .git/config or submodule configuration) across two specific commits. I see this being particularly useful in scenarios like: When a submodule is added or updated between two commits, helping to easily track and compare the submodule's configuration changes. Identifying configuration changes (e.g., repository settings) made between different commits without having to manually examine each commit’s changes. Comparing various configuration-related changes in large repositories. For example, when managing repositories with submodules, this feature could quickly highlight differences in submodule references, paths, or URLs, saving time and providing better traceability. The .gitmodules file is tracked though, so you can simply diff two versions of it (technically, you are diffing two blobs): git diff commit1:.gitmodules commit2:.gitmodules Hope this helps, Philippe.