#391 Simplify appearance of plain file renames
Closed: Fixed Opened by jpokorny.

Compare https://github.com/pypingou/pagure/commit/7f3fd407890a56fb65d9a18e53ee937a94c0a8e2 (out of luck, it works as expected, but this wasn't meant a priori as clone-GH request) and https://pagure.io/pagure/7f3fd407890a56fb65d9a18e53ee937a94c0a8e2


s/out of luck/by good luck/

Any suggestion on how to do this?

Now I am strictly not investigating how GH works in details, but trying
to answer that question on my own:

  1. always indicate when there is a rename and other non-content changes
    (executable flag un-/set), with or without subsequent modification,
    with a dedicated line (per each such item) between the commit message
    and the diff area

  2. if the content for files being subject of the previous processing
    does not change, simply omit respective diff chunks
    (file removed+added) in the diff area as it only clutters the overview

Does it make sense?

Now I am strictly not investigating how GH works in details, but trying
to answer that question on my own:

  1. always indicate when there is a rename and other non-content changes
    (executable flag un-/set), with or without subsequent modification,
    with a dedicated line (per each such item) between the commit message
    and the diff area

  2. if the content for files being subject of the previous processing
    does not change, simply omit respective diff chunks
    (file removed+added) in the diff area as it only clutters the overview

Does it make sense?

This does make sense, I am just un-sure if/how to do it with pygit2. Something
to look into :)

Ok so I have looked at the rename situation and this is what I came to:

I have made an example PR that has two commits:

  • Change something in the test file
  • Rename the test file to test_foo

This is a screenshot of the results:

pagure_rename.png

Thoughts?

Note: I've been trying to find out if there is a way to get the filemode information out of pygit2 but without success so far

If it was as depicted, it would make me happy :)

Fixed in https://pagure.io/pagure/pull-request/405

Metadata