git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Does or could git handle file licensing information?

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 5, 2012, 09:17 UTC
Message-ID
<CACBZZX5DOgfwot=Murke4i4=QgUPiLJFSOicYRX_DZu1-3-_ZQ@mail.gmail.com>
In-Reply-To
<201209051251.51203.yohann.ferreira@orange.fr>

On Wed, Sep 5, 2012 at 12:51 PM, Yohann Ferreira <yohann.ferreira@orange.fr> wrote:

> As a day-to-day hard git user ;), I also have to manage files with different
> licenses I need to track.
> As git handles all those files in a very smart way, I wondered whether git
> could also handle that information, at least somehow.
Say you have files like:
    main.c
    imglib.c
    config.c
Why not just have these files:
    license-info/GPL
    license-info/SOME-OTHER-LICENSE
Which would contain, respectively:
    main.c
    config.c
And:
    imglib.c

Then just have a script, maybe add it as a hook on your server before it accepts a push which ensures that all files currently in the tree are listed in those license-info/* files.

You could also just add a license header to each of these files, and have a script that ensures that everything has such a header. I think the Debian project has such a script that you could adapt.

Git just tracks files, so just do this in some file-based manner and you'll be fine.

Previous: Yohann Ferreira
Message 2 of 2 in “Does or could git handle file licensing information?”
  1. Yohann FerreiraSep 5, 2012
  2. Ævar Arnfjörð BjarmasonSep 5, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.