git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Configurable filename for what is now .gitignore
@ 2014-08-30  3:33 Bostjan Skufca
  2014-08-30  5:43 ` Jonathan Nieder
  0 siblings, 1 reply; 6+ messages in thread
From: Bostjan Skufca @ 2014-08-30  3:33 UTC (permalink / raw)
  To: git

Hi there,

I created a patch which makes ".gitignore" filename configurabe.
Preliminary diff is pasted below.

My question is:
Would something like this be acceptable for inclusion?
(providing documentation and test cases will be done too, of course)

See "Motivation" part below for additional explanation.

Possible downsides:
- default filename .gitignore is kept, so there is no issue here, if
this new config option is not changed
- increased support questions, but I think generally people would not
change this setting without having a good reason


Motivation:
Git is great for tracking code development, but when deploying
mentioned code by using git itself, various configuration files must
be created additionally, which are normally .gitignored, for various
reasons (code portability, sensitive data, etc). There is currently no
simple way of tracking changes to those critical configuration files
(at least none that I am aware of).

One way to approach this would be tracking those changes in separate
git repository. It is possible to create this second repo outside of
code repository. But this gets messy very fast (you still need to
create symlinks in code repository, or sth).

It would be splendid if this configuration tracking repository could
be created inside code repository, but in a "separate namespace".
(I've just found out that "namespaces" word is already used for
different concept in git 2.1.x, so let's call it "dirspace" in this
discussion).

Separate dirspace is currently possible for ".git" directory via
GIT_DIR environment variable. Adding possibility of using
differently-named .gitignore files is first step for dirspaces,
.gitmodules and .gitattributes are another two filenames that would
need to be made configurable.

I can imagine a tiny tool, let's call it "gitsth". When called, sets
GIT_DIR from .git to .gitsth, and in .gitsth/config configures
alternate filenames for .gitignore, .gitmodules and .gitattributes to
.gitignoreSTH, .gitmodulesSTH and .gitattrSTH (for example). This
.gitignoreSTH could then be used to ignore all files except
configuration files that need to be tracked.

That is just my imaginative usecase. Think of it as sort of
overlay-git. Git would only need to provide tools for it, so that on
top of those tools new solutions could be created. Other usecases
would probably pop up sooner or later.


Thank you for your opinion,
b.


Readable diff format: http://pastiebin.com/53ff8747b97f1
Actual patch:
(redacted, as vger swallowed two sending tries with a "250 2.7.1 Looks
like Linux source DIFF email.." response)

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

end of thread, other threads:[~2014-09-04 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-30  3:33 Configurable filename for what is now .gitignore Bostjan Skufca
2014-08-30  5:43 ` Jonathan Nieder
2014-08-31  1:55   ` Bostjan Skufca
2014-09-01 20:30     ` Bostjan Skufca
2014-09-01 23:33       ` Duy Nguyen
2014-09-04 20:33         ` Bostjan Skufca

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).