git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rebase, file permissions and removed file
@ 2008-10-27 14:02 Pascal Obry
  2008-10-27 14:38 ` Johannes Sixt
  0 siblings, 1 reply; 7+ messages in thread
From: Pascal Obry @ 2008-10-27 14:02 UTC (permalink / raw)
  To: Git Mailing List

In short,

   - a branch is created
   - a file is removed from master
   - the same file has its permissions changed on the branch
   - we rebase the branch on master
   - how to resolve the conflict?

Following is a script to reproduce the problem, see comment at the end.

Any idea? Thanks.

<<
-- #!/bin/sh

rm -fr repo

mkdir repo
cd repo
git init

touch file1 file2
chmod a+x file*
git add .
git ci -m "First rev"

git checkout -b fixperms
chmod a-x file1
git add file1
git ci -m "Fix perm file1"

git checkout master
git rm file1
git ci -m "Remove file1"

git checkout fixperms

git rebase master

# At this point there is a conflict as expected
# file1 has been removed on master, and file1 had its permissions changed
# on fixperms branch.
#
# What I find confusing is that:
#    $ git diff
# and
#    $ git diff --cached
#
# are reporting nothing.
#
# Ok, file1 has been removed, let's then remove it as it is right:
#
#   $ git rm file1
#   fatal: pathspec 'file1' did not match any files
#
# Ok, so what's the proper way to fix that! What should I do to be able to
# continue the rebase:
#
#   $ git rebase --continue
>>

--

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-27 17:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 14:02 rebase, file permissions and removed file Pascal Obry
2008-10-27 14:38 ` Johannes Sixt
2008-10-27 15:09   ` Pascal Obry
2008-10-27 15:21     ` Johannes Sixt
2008-10-27 15:33       ` Pascal Obry
2008-10-27 16:39         ` Samuel Tardieu
2008-10-27 17:12           ` Pascal Obry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).