From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: martin f krafft <madduck@madduck.net>
Subject: Re: merging .gitignore
Date: Mon, 1 Oct 2007 14:48:16 +0100 [thread overview]
Message-ID: <200710011448.17701.andyparkins@gmail.com> (raw)
In-Reply-To: <20071001130314.GA5932@lapse.madduck.net>
On Monday 2007 October 01, martin f krafft wrote:
> Feature branch A has a .gitignore file, and it's been merged into
> master for a while. Today, feature branch B failed to merge into
> master because it also provides a .gitignore file. We can obviously
> resolve the conflict, but I wonder whether there is a better way to
> deal with this since we deal with quite a large number of new
> feature branches and it's only a matter of time until the next one
> will conflict because of .gitignore.
But it _is_ a conflict. Conflicts have to be resolved. I'm having difficulty
understanding what you think git should be doing in these cases?
> (and yes, this is basically a reincarnation of my case for
> .gitignore.d [http://lists.zerezo.com/git/msg627581.html]).
I don't see that that would help. All you are doing with a gitignore.d is
swapping lines for files, the conflicts would still exist. Presumably you
are hoping that the separate branches will make different files in
gitignore.d and hence can't conflict; but then you've just pushed the
conflict to a place where it won't be seen (and also made a terrible mess of
the merged branch gitignore.d).
branchA:.gitignore.d/branchAignores
branchB:.gitignore.d/branchBignores
Over time you would get:
master:.gitignore.d/branchAignores
master:.gitignore.d/branchBignores
master:.gitignore.d/branchCignores
master:.gitignore.d/branchDignores
master:.gitignore.d/branchEignores
master:.gitignore.d/branchFignores
Then, assuming the conflicts you get now occur for a reason, you will get
conflicts within the .gitignore.d/ directory. Let's say branchCignores adds
*.o and branchFignores removes *.o from the ignores. Who is right? Who
knows, and worse than that you didn't see the conflict when it happened so it
wasn't resolved and the master branch was left with conflicts in it.
Of course the conflicts in that case aren't in the form of "<<<<<" markers,
but they are no less conflicts just because they're invisible.
Eventually someone is going to want to combine this ever-increasing set of
ignore files into one. i.e. they'll merge them. In which case why couldn't
you do the merge at the correct time - when the branch was merged?
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next prev parent reply other threads:[~2007-10-01 13:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 13:03 merging .gitignore martin f krafft
2007-10-01 13:48 ` Andy Parkins [this message]
2007-10-02 19:51 ` martin f krafft
2007-10-02 19:55 ` Junio C Hamano
2007-10-02 20:20 ` martin f krafft
2007-10-02 20:13 ` Pierre Habouzit
2007-10-02 20:47 ` Pierre Habouzit
2007-10-02 20:56 ` martin f krafft
2007-10-02 21:07 ` Pierre Habouzit
2007-10-02 21:49 ` martin f krafft
2007-10-02 22:07 ` Pierre Habouzit
2007-10-03 8:42 ` martin f krafft
2007-10-03 8:58 ` Pierre Habouzit
2007-10-02 21:02 ` Pierre Habouzit
2007-10-03 8:23 ` Andy Parkins
2007-10-03 9:28 ` Johan Herland
2007-10-03 12:41 ` Johannes Schindelin
2007-10-03 13:06 ` Johan Herland
2007-10-03 19:38 ` Junio C Hamano
2007-10-01 13:57 ` Johannes Schindelin
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=200710011448.17701.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
--cc=madduck@madduck.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).