[remote rejected] No changes between prior commit and new commit

1,487 views
Skip to first unread message

Olivier Croquette

unread,
Mar 26, 2014, 8:15:53 AM3/26/14
to repo-d...@googlegroups.com
Hi,

I have updated the permissions of a file using:
git update-index --chmod=+x

After commit, git log -p locally shows:

diff --git a/f.exe b/f.exe
old mode 100644
new mode 100755

When I try to push this commit to Gerrit, I get the following error message:
No changes between prior commit and new commit

It seems that Gerrit doesn't consider the changes to the permission to determine if a commit contains a change. Is that by design ? Or should I open a bug report ?

Is there another workaround than to modify the content of another unrelated file in the same commit ?

Cheers,

Olivier

Shawn Pearce

unread,
Mar 26, 2014, 9:54:58 AM3/26/14
to Olivier Croquette, repo-discuss
On Wed, Mar 26, 2014 at 5:15 AM, Olivier Croquette <ocroq...@free.fr> wrote:
> I have updated the permissions of a file using:
> git update-index --chmod=+x
>
> After commit, git log -p locally shows:
>
> diff --git a/f.exe b/f.exe
> old mode 100644
> new mode 100755
>
> When I try to push this commit to Gerrit, I get the following error message:
> No changes between prior commit and new commit

You aren't pushing the new commit. Or something.

The block of code that triggers this compares the two root trees by
SHA-1. That SHA-1 computation considers every byte of every file,
every file path, and every file mode. Gerrit saw identical SHA-1s,
which means the tree was not changed.

Olivier Croquette

unread,
Mar 26, 2014, 10:45:37 AM3/26/14
to repo-d...@googlegroups.com, Olivier Croquette
On Wednesday, March 26, 2014 2:54:58 PM UTC+1, Shawn Pearce wrote:
> When I try to push this commit to Gerrit, I get the following error message:
> No changes between prior commit and new commit

You aren't pushing the new commit.

You are right. Something went wrong there. I tested it again and it works as expected.

However I came across another issue. When reviewing such changes, Gerrit displays the following message in the diff in the web interface:


old mode 100644
new mode 100755
Binary files differ

The statement "Binary files differ" seems wrong, and can create quite some confusion for the code review. Is that a known problem (or is it me again ? :) )

Regards

Olivier

 
Reply all
Reply to author
Forward
0 new messages