Thread (17 messages) 17 messages, 5 authors, 2017-09-28

Re: [PATCH] diff: correct newline in summary for renamed files

flat view

From: Jeff King <hidden>
Date: 2017-09-28 00:39:21

On Wed, Sep 27, 2017 at 04:57:40PM -0700, Stefan Beller wrote:
quoted
quoted
+     GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
+     GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
+     export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
+     git checkout -b mode initial &&
+     git update-index --chmod=+x file0 &&
would 'test_chmod +x file0 &&' work here?
Oh, I forgot we had that.
That is what I was looking for in my previous solution,
this one doesn't care about the on-disk things at all (regarding
the mode of files).
It still wouldn't have helped there. It does an on-disk chmod and an
index update, with the assumption that the chmod will be a noop on some
systems. So it's good if you want to put the executable bit in the index
and you'd like the working tree to match if it can, or have its change
ignored otherwise.

But if you care about seeing a diff between the working tree and index,
that still wouldn't work.
So I would argue that test_chmod may be overkill
(well we could drop the force flag from the following
checkout... not sure if that is a good trade off)
The "-f" certainly caught me (I only added it after seeing the test
fail). So maybe it's worth doing. I doubt it's all that big a deal
either way.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help