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

Re: [PATCH v8 7/7] fast-import: add (non-)relative-marks feature

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Dec 4, 2009, 18:09 UTC
Message-ID
<alpine.LNX.2.00.0912041258280.14365@iabervon.org>
In-Reply-To
<1259946420-8845-8-git-send-email-srabbelier@gmail.com>
On Fri, 4 Dec 2009, Sverre Rabbelier wrote:
Show 24 quoted lines
> After specifying 'feature relative-marks' the paths specified with
> 'feature import-marks' and 'feature export-marks' are relative to an
> internal directory in the current repository.
> 
> In git-fast-import this means that the paths are relative to the
> '.git/info/fast-import' directory. However, other importers may use a
> different location.
> 
> Add 'feature non-relative-marks' to disable this behavior, this way
> it is possible to, for example, specify the import-marks location as
> relative, and the export-marks location as non-relative.
> 
> Also add tests to verify this behavior.
> 
> Cc: Daniel Barkalow <barkalow@iabervon.org>
> Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
> ---
> 
> 	As requested by Daniel, it is now possible to have the marks be
> 	relative to a constant directory. We might want to consider making
> 	this the default at some point.
> 
> 	This patch opens the way for remote-helpers to use the marks feature
> 	without poluting the work tree, which I think is very important.

I think it would be better to make relative paths be the only available method, in part because we don't want to polute the work tree, but more because otherwise scripts aren't transferrable. That is, if you have an absolute path, you can't send the same script to two different importers (because they'd have to write their marks to the same location). And there's no way for the program constructing a script to determine a good absolute location if the script may be run on a different host than it's generated on (think of getting a Linux user getting a script attached to a bug report from a native Windows user; there are no absolute paths that are valid on both of these).

(However, it probably does make sense to permit absolute paths in the command line, since whoever's writing the command line is presumably aware of any local conventions)

	-Daniel
*This .sig left intentionally blank*
Previous: Sverre Rabbelier
Message 9 of 9 in “fast-import: add new feature and option command”
  1. 0/7 fast-import: add new feature and option commandSverre Rabbelier, Dec 4, 2009
  2. 1/7 fast-import: put option parsing code in separate functionsSverre Rabbelier, Dec 4, 2009
  3. 2/7 fast-import: put marks reading in it's own functionSverre Rabbelier, Dec 4, 2009
  4. 3/7 fast-import: add feature commandSverre Rabbelier, Dec 4, 2009
  5. 4/7 fast-import: add option commandSverre Rabbelier, Dec 4, 2009
  6. 5/7 fast-import: test the new option commandSverre Rabbelier, Dec 4, 2009
  7. 6/7 fast-import: allow for multiple --import-marks= argumentsSverre Rabbelier, Dec 4, 2009
  8. 7/7 fast-import: add (non-)relative-marks featureSverre Rabbelier, Dec 4, 2009
  9. Daniel BarkalowDec 4, 2009

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.