From: Holger Hellmuth <hellmuth@ira.uka.de>
To: pascal@obry.net
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: How to deal with mixed tree?
Date: Tue, 22 Nov 2011 17:14:07 +0100 [thread overview]
Message-ID: <4ECBCA4F.5090505@ira.uka.de> (raw)
In-Reply-To: <4ECBBDE3.3010904@obry.net>
On 22.11.2011 16:21, Pascal Obry wrote:
> In fact I want to do that in a branch (say work) and keep master as-is
> as this branch is used to pull changes from origin. And in this case,
> doing 'git diff master' still shows the files under src2. See script to
> reproduce:
[...]
> # let's replace src2 by sd in branch work
>
> git checkout -b work
> git rm src2/*
> git ci -m "no more src2"
> # ln -s ../sd src2
> cp -r ../sd src2
>
> # make sure src2 is excluded
>
> echo 'src2'>> .git/info/exclude
>
> # the following output should be clean
>
> echo '============== Status'
> git status
>
> echo '============== Diff'
> git diff
>
> echo '============== Diff master'
> git diff master
>>>
>
> Is that possible?
>
In my not-really-expert opinion no. At least git diff master has to show
something because there obviously is a difference between what is in
master (that you can't gitignore) and your branch (whether you ignore it
or not).
I would
a) use a different directory name for src2 and adapt the Makefile to
cope with that
or
b) remove the src2 link from .git/info/exclude and commit it into the
branch. That way whenever you switch branch and master, the correct dir
or link will be present and still because of the link none of the files
in the svn will be handled by git in any way
next prev parent reply other threads:[~2011-11-22 16:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 11:21 How to deal with mixed tree? Pascal Obry
2011-11-22 11:35 ` Holger Hellmuth
2011-11-22 14:20 ` Pascal Obry
2011-11-22 15:08 ` Holger Hellmuth
2011-11-22 15:21 ` Pascal Obry
2011-11-22 16:14 ` Holger Hellmuth [this message]
2011-11-22 17:29 ` Pascal Obry
2011-11-22 18:29 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECBCA4F.5090505@ira.uka.de \
--to=hellmuth@ira.uka.de \
--cc=git@vger.kernel.org \
--cc=pascal@obry.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).