* Filtering mode changes
@ 2008-08-01 11:25 Stefan Naewe
2008-08-01 12:23 ` Matt Pearson
2008-08-01 12:32 ` Santi Béjar
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Naewe @ 2008-08-01 11:25 UTC (permalink / raw)
To: git
Hi there.
Here's my story:
- I did some minor modifications to a repo that I want to 'give back'.
- I worked on my own branch (of course).
- I was stupid to edit the files (that live on a linux box) through a windows
network share.
- When I created diffs (using 'git format-patch') to send send 'upstream', I
noticed that the edited files got their executable bit set (old mode 100644 ->
new mode 100755)
- I created another commit to undo the mode changes.
My question:
Is there a way to create clean diffs (between master and my branch) that don't
contain the 'double mode change' (from 644 to 755 to 644) ?
TIA
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Filtering mode changes
2008-08-01 11:25 Filtering mode changes Stefan Naewe
@ 2008-08-01 12:23 ` Matt Pearson
2008-08-01 12:32 ` Santi Béjar
1 sibling, 0 replies; 3+ messages in thread
From: Matt Pearson @ 2008-08-01 12:23 UTC (permalink / raw)
To: Stefan Naewe; +Cc: git
On Fri, Aug 1, 2008 at 7:25 AM, Stefan Naewe <stefan.naewe+git@gmail.com> wrote:
> Hi there.
>
> Here's my story:
>
> - I did some minor modifications to a repo that I want to 'give back'.
> - I worked on my own branch (of course).
> - I was stupid to edit the files (that live on a linux box) through a windows
> network share.
> - When I created diffs (using 'git format-patch') to send send 'upstream', I
> noticed that the edited files got their executable bit set (old mode 100644 ->
> new mode 100755)
> - I created another commit to undo the mode changes.
>
> My question:
>
> Is there a way to create clean diffs (between master and my branch) that don't
> contain the 'double mode change' (from 644 to 755 to 644) ?
>
You probably want to use 'git rebase -i master' and the 'squash'
command to combine the changes into one. If multiple commits messed up
the permissions, use the 'edit' command and the rebase will stop after
the specified commits, allowing you to fix things up, then do 'git
commit --amend'. Use 'git rebase --continue' to continue fixing the
patches.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Filtering mode changes
2008-08-01 11:25 Filtering mode changes Stefan Naewe
2008-08-01 12:23 ` Matt Pearson
@ 2008-08-01 12:32 ` Santi Béjar
1 sibling, 0 replies; 3+ messages in thread
From: Santi Béjar @ 2008-08-01 12:32 UTC (permalink / raw)
To: Stefan Naewe; +Cc: git
On Fri, Aug 1, 2008 at 13:25, Stefan Naewe <stefan.naewe+git@gmail.com> wrote:
> Hi there.
>
> Here's my story:
>
> - I did some minor modifications to a repo that I want to 'give back'.
> - I worked on my own branch (of course).
> - I was stupid to edit the files (that live on a linux box) through a windows
> network share.
Then, you should set core.fileMode to false.
> - When I created diffs (using 'git format-patch') to send send 'upstream', I
> noticed that the edited files got their executable bit set (old mode 100644 ->
> new mode 100755)
You can just edit the patches and remove the "old/new mode" lines.
> - I created another commit to undo the mode changes.
You can use "git rebase -i" and edit (or squash) the revision before
generating the patch.
Santi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-01 12:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 11:25 Filtering mode changes Stefan Naewe
2008-08-01 12:23 ` Matt Pearson
2008-08-01 12:32 ` Santi Béjar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox