public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Proposal and Validation of Git Compile
@ 2024-03-13  3:24 Bhargav Vishnu
  2024-03-13  8:08 ` Reto
  0 siblings, 1 reply; 3+ messages in thread
From: Bhargav Vishnu @ 2024-03-13  3:24 UTC (permalink / raw)
  To: git


[-- Attachment #1.1: Type: text/plain, Size: 1733 bytes --]

Hello,

I'm writing to propose and get a validation of one of the ideas I had for
git tool.
Background:
We are currently able to clone the complete repository and access the code.
Why don't we allow only part of the code maybe a few lines to be imported
into the repository?

Issues:
- Developers have duplicate code within which could be a utility file and
some repositories have whole sets of codes like the Algorithms repository.
We would only require a particular algorithm from that repository, in those
cases, there isn't an easy way to import that snippet.
- A large amount of similar duplicate codes are written by authors in
different personal projects like utilities. These must be made reusable.
Eg: Code on a gist is copied into every repository, why not create and use
the gist itself as it also has versioning?

Idea:
- Specify a syntax which specifies how to import the gist or snippet
- When creating the file use the syntax to import the snippet
- Users need to compile the new file to resolve the snippet but the
decompiled version with the syntax is retained in the cache
- When the user pushes the file use the decompiled version but not the
compiled version so that the git hosted on the server can make references
between repositories and gists
- When another user pulls the decompiled file, the file is compiled as part
of git pull and resolved in the remote reference with the snippet so the
user can run the code.


Issues:
Syntax might not be recognized by editors
Trust external author's code in production

I have attached the workflow below

I would like to know if there is a better way to solve this issue and avoid
code duplication as I have limited knowledge of git.

Thank You

With Regards
Bhargav

[-- Attachment #1.2: Type: text/html, Size: 2091 bytes --]

[-- Attachment #2: working.jpeg --]
[-- Type: image/jpeg, Size: 800063 bytes --]

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

end of thread, other threads:[~2024-03-13  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-13  3:24 Proposal and Validation of Git Compile Bhargav Vishnu
2024-03-13  8:08 ` Reto
2024-03-13  9:59   ` Konstantin Khomoutov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox