rmarquis / pacaur

[unmaintained] An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
796 stars 113 forks source link

Show diff not log when displaying the changes of the build files #671

Closed coder-hugo closed 7 years ago

coder-hugo commented 7 years ago

The current code uses git log for displaying the changes of the build files. This makes it really hard to see what has changed if there are several commits for a package since the last run of pacaur. I think using git diff would be the better approach for this. Especially git diff does exactly what the prompt before says.

rmarquis commented 7 years ago

I'm not sure to understand why using git log makes it really hard. Care to elaborate?

Relevant commit: 3a4a6f970dc7b7d166617b84a7b94dd7a32e64b5

ArchangeGabriel commented 7 years ago

I for one love the fact we get git log -p instead of git diff like yaourt does, because I want to see the history of changes and why they were made. And like @rmarquis, I fail to see how git log makes it hard to see what changed: as a matter of fact, it makes it easier for me because you see changes grouped with the other they relates to rather than the global diff.

coder-hugo commented 7 years ago

If I want to see the complete history I can go to AUR and follow the "View Changes" link. At the moment I want to install a package I'm just interested in the whole change in one single diff. I do this the same way when I review pull/merge requests as the result of all commits is the thing that matters in the end and not each single commit. Just if there is a questionable change in a pull request I'll have a look to the commit that contains the change to find the reason for it. Reviewing each and every commit of a pull request is just wasting of time and this is the same for reviewing the changes of the build files. And with git log it is really hard to figure out the real changes if several commits are touching the same or almost the same line of a file. But if there are people who like wasting their time by reviewing always each and every commit instead of having just a single diff of the change it would be nice to have at least the possibility to configure the behavior.

rmarquis commented 7 years ago

@coder-hugo Yes, make sense to me, since what you're interested in checking the PKGBUILDs is the diff, not individual commits. This was also the initial behavior. I'd like to make this default and avoid another option for this, since it's really feature creep imho.

@blueyed FYI ^

rmarquis commented 7 years ago

Done in b0c7c3e669dd39b060800a512a43e14a6df2e6d5.

blueyed commented 7 years ago

My main intention for this change was "This includes the commit messages, which are useful to see.".

Can we maybe have git log --oneline on top of the diff?

rmarquis commented 7 years ago

How "on top of the diff" would be implemented?

blueyed commented 7 years ago

Just run them after each other?

rmarquis commented 7 years ago

This is far from ideal... Commit messages are interesting to see, but I'm not sure they are really useful in that context.

blueyed commented 7 years ago
  1. They do no harm neither: typically there will be 1-3 lines there then. The problem with only the diff is that you will have to grasp the context from the diff - so much for "wasting time"; I'd rather skim 3 diffs that might have been amended, but tell me what happened then a single diff without any context.

  2. What about including the "View Changes" link regardless? It would allow to easily open it to see all the details easily.

rmarquis commented 7 years ago
  1. The purpose of the viewing is the detect harmful code, not to understand why a specific change has been made. While history may help in doing the former, these are two distinct tasks.

  2. I like that idea. I'll see if I can find a nice way to add this link.