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

Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?, .gitacls? etc.

From
JHJan Hudec <bulb@ucw.cz>
Date
Sep 4, 2007, 21:03 UTC
Message-ID
<20070904210349.GE3786@efreet.light.src>
In-Reply-To
<loom.20070827T185519-641@post.gmane.org>
On Mon, Aug 27, 2007 at 17:07:34 +0000, Sergio Callegari wrote:
Show 35 quoted lines
> David Kastrup <dak <at> gnu.org> writes:
> 
> > 
> > Sergio Callegari <scallegari <at> arces.unibo.it> writes:
> > 
> > > Couldn't all this directory/ownership/permission tracing be easily
> > > done by using hooks?  E.g. Having a pre-status and pre-commit hook
> > > one could fire up a program/script to collect all the extra info he
> > > wants to trace and store it somewhere (typically in some traced
> > > file).  The other way round one could have a post-checkout hook and
> > > he could arrange it to fire up some program to look into the
> > > extra-info file to set up all the meta-data he wants.
> > >
> > > This would be very flexible and would permit to manage absolutely
> > > /any/ kind of the metadata leaving absolute freedom about how to do
> > > so.
> > >
> > > Am I missing something here?
> > 
> > Merging.
> > 
> 
> Sorry, maybe I am really missing something, since merging does not look to me
> as an issue.
> 
> Why cannot git simply do the merging in the working tree as it normally
> does, including merging of the traced metadata file generated by the metadata
> helpers invoked via the hooks?
> Only, again more hooks are needed and likely a post-merge hook, so that at
> the end of the merge, the metadata can be applied.
> 
> Only, to have things going on smoothly, one should be so wise to assure that
> the metadata helpers save metadata as nice, sorted text files in order to
> minimize the burden of manual intervention if there are conflicts in
> metadata merging.

The post-checkout (no need for post-merge -- after in-index merge is done, the files are checked out to worktree, so post-checkout would run anyway) could actually apply any custom merge strategy required to avoid/clean up spurious conflicts in the metadata file (eg. adding two files that go after each other would be a textual conflict). The relevant versions are stored in index stages at that point.

> BTW.  Having a post-checkout hook could also help getting rid of unwanted
> empty directories, couldn't it?

Probably not. I would imagine it would actually only run for the files being checked out -- and there is nothing checked out in empty directories. (Well, it would run once or once per directory with list of checked out files on standard input).

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Sergio CallegariNext: Dmitry Kakurin
Message 21 of 28 in “.gitignore, .gitattributes, .gitmodules, .gitprecious?, .gitacls? etc.”
  1. Dmitry KakurinAug 26, 2007
  2. Junio C HamanoAug 26, 2007
  3. Dmitry KakurinAug 26, 2007
  4. Junio C HamanoAug 26, 2007
  5. Dmitry KakurinAug 26, 2007
  6. Junio C HamanoAug 26, 2007
  7. Dmitry KakurinAug 26, 2007
  8. Petr BaudisAug 26, 2007
  9. Sam VilainAug 27, 2007
  10. David KastrupAug 27, 2007
  11. Sam VilainAug 27, 2007
  12. David KastrupAug 27, 2007
  13. Johannes SchindelinAug 27, 2007
  14. Johannes SchindelinAug 26, 2007
  15. martin f krafftAug 27, 2007
  16. Sergio CallegariAug 27, 2007
  17. David KastrupAug 27, 2007
  18. Petr BaudisAug 27, 2007
  19. Sergio CallegariAug 27, 2007
  20. Sergio CallegariAug 27, 2007
  21. Jan HudecSep 4, 2007
  22. .gitignore, .gitattributes, .gitmodules, .gitprecious?,.gitacls? etc.Dmitry Kakurin, Aug 27, 2007
  23. Jan HudecSep 4, 2007
  24. Dmitry KakurinSep 5, 2007
  25. Junio C HamanoSep 5, 2007
  26. Dmitry KakurinSep 5, 2007
  27. Jan HudecSep 5, 2007
  28. Jan HudecSep 4, 2007

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.