If you download a drupal module via "drush dl" (or web download), you will see something slightly different from what you get with git clone.
The "$Id$ expands to $Id ..... blabla ..$
The *.info file gets a few extra lines
The project dir gets a LICENSE.txt
This is a bit odd if you want to use git to compare your working (hacked) version of a module with the original. A lot of noise showing up, making it difficult to identify the real differences.
What can we do about it?
- for each project, create a separate public repository with the processed ($Id$ expanded etc) module code, read-only to anyone except the packaging script. (this is why it has to be a separate repo)
- the original (unprocessed) project repository is added as a remote
- for every release branch and tag of the remote (unprocessed), we add a processed child tag or branch on this separate repository.
Now, if you want to git diff or merge, you can simply clone the processed repository.
Or does something like this already exist on a 3rd party site?
Comments
Comment #1
sdboyer CreditAttribution: sdboyer commentedThis discussion started playing out on g.d.o. Capturing the relevant part of the thread:
sdboyer:
donquixote:
sdboyer:
donquixote:
Comment #2
donquixote CreditAttribution: donquixote commentedThanks!
Comment #3
sdboyer CreditAttribution: sdboyer commentedYou are seriously trying my patience. I am enormously in favor of having conversations about improving drupal.org and our Git infra, but when you simply blow past the crucial issues I've raised and keep on throwing crap out there without addressing my key questions, it goes from "potentially useful conversation" to "colossal waste of time."
Please read what I have written. .info file modifications in Git are pointless and stupid. It is a solved problem - git_deploy. That is a *FAR* better solution than introducing a whole new network of repositories. I've said it twice now, and you blow right past it. Putting those modifications in Git is like giving someone a rusty compass when they're already carrying a portable GPS.
Wrong. I can tell you: a test will indicate this is trivial in system resource terms. The problem is the total-system complexity this would introduce. Without some significant, defined benefit, there is *no* way this is worth it.
As for doing this just off of tags, rather than on every branch tip, yes, that's less insane. But it's still pretty pointless. Which brings us back to my question - another you blew right past - What problem are you trying to solve?
I'm sorry, but until you (or someone else) can answer the question of what problem this solves, providing specific use cases/legal arguments (re: LICENSE.txt), this proposal is dead in the water.
Comment #4
sdboyer CreditAttribution: sdboyer commentedupdating the status to reflect "dead in the water"
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedAlso see #806484: Expose Git repositories containing only releases, to be used for deployment, which I believe is the original intend.
Comment #6
donquixote CreditAttribution: donquixote commented@Damien Tournoud,
More or less the same idea. No mention of LICENSE.txt, though. How important do you consider the LICENSE.txt?
@sdboyer,
The benefit within your "dog" context would be the added LICENSE.txt.
Is this relevant? I dunno. You assume yourself this is a "small enough problem that we can deal with it". Others might disagree. Personally I don't know.
But if someone would give you the LICENSE.txt for free, then I imagine you would probably take it.
Outside of the "dog" context, these release repos would allow people to download individual modules with git, and avoid some of the git noise this would bring if the LICENSE.txt was missing.
Just consider some people might play with git occasionally, until they feel confident enough to switch the entire project's workflow.
Again this benefit (of less noise in changesets) is quite small, but if you get it "for free", then why not.
So, we have this "small, maybe irrelevant" benefits vs a "simply not feasible, period" implementation / maintenance / whatever cost.
We found that the "simply not feasible, period" is wrong. The "for free" is also wrong, but if someone (Damien) already made it, then for anyone else it can be regarded as "for free".
Comment #7
donquixote CreditAttribution: donquixote commentedBtw..
the $Id$ is no longer expanded in git, but it is expanded in all tarballs that were generated for previous releases. And it is expanded in installed modules on existing sites.
My own use case was exactly this:
I wanted to use git to compare an older version of a module to the respective version in git, to find if and where it is locally modified.
This proved to be quite a pain, because the git version did not have the $Id$ expanded, etc.
I know there are other ways to do this kind of comparison:
- the "hacked" module
- drush dl the old version to some folder and then compare
- drush dl the old version, and then create my own git repo
But at this time I really wanted to find out what is possible with git.