Re: [PATCH/RFC v3 14/16] transport-helper: add import|export-marks to fast-import command line.

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH/RFC v3 14/16] transport-helper: add import|export-marks to fast-import command line.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:29

Florian Achleitner [off-list ref] writes:
quoted hunk
fast-import internally uses marks that refer to an object via its sha1.
Those marks are created during import to find previously created objects.
At exit the accumulated marks can be exported to a file and reloaded at
startup, so that the previous marks are available.
Add command line options to the fast-import command line to enable this.
The mark files are stored in info/fast-import/marks/<remote-name>.

Signed-off-by: Florian Achleitner <redacted>
---
 transport-helper.c |    3 +++
 1 file changed, 3 insertions(+)
diff --git a/transport-helper.c b/transport-helper.c
index 7fb52d4..47db055 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -387,6 +387,9 @@ static int get_importer(struct transport *transport, struct child_process *fasti
 	fastimport->in = helper->out;
 	argv_array_push(&argv, "fast-import");
 	argv_array_push(&argv, debug ? "--stats" : "--quiet");
+	argv_array_push(&argv, "--relative-marks");
+	argv_array_pushf(&argv, "--import-marks-if-exists=marks/%s", transport->remote->name);
+	argv_array_pushf(&argv, "--export-marks=marks/%s", transport->remote->name);
Is this something we want to do unconditionally?

Re: [PATCH/RFC v3 14/16] transport-helper: add import|export-marks to fast-import command line.

From: Florian Achleitner <hidden>
Date: 2016-06-15 22:54:29

On Wednesday 15 August 2012 22:20:45 Florian Achleitner wrote:
On Wednesday 15 August 2012 12:52:43 Junio C Hamano wrote:
quoted
Florian Achleitner [off-list ref] writes:
quoted
fast-import internally uses marks that refer to an object via its sha1.
Those marks are created during import to find previously created
objects.
At exit the accumulated marks can be exported to a file and reloaded at
startup, so that the previous marks are available.
Add command line options to the fast-import command line to enable this.
The mark files are stored in info/fast-import/marks/<remote-name>.

Signed-off-by: Florian Achleitner <redacted>
---

 transport-helper.c |    3 +++
 1 file changed, 3 insertions(+)
diff --git a/transport-helper.c b/transport-helper.c
index 7fb52d4..47db055 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -387,6 +387,9 @@ static int get_importer(struct transport *transport,
struct child_process *fasti>

 	fastimport->in = helper->out;
 	argv_array_push(&argv, "fast-import");
 	argv_array_push(&argv, debug ? "--stats" : "--quiet");

+	argv_array_push(&argv, "--relative-marks");
+	argv_array_pushf(&argv, "--import-marks-if-exists=marks/%s",
transport->remote->name); +	argv_array_pushf(&argv,
"--export-marks=marks/%s", transport->remote->name);
Is this something we want to do unconditionally?
Good question. It doesn't hurt, but it maybe . We could add another
capability for remote-helpers, that tells us if it needs masks. What do you
think?
Btw, for fast-export, there is already such a capability. It specifies a 
filename, in addition.

Re: [PATCH/RFC v3 14/16] transport-helper: add import|export-marks to fast-import command line.

From: Florian Achleitner <hidden>
Date: 2016-06-15 22:54:29

On Wednesday 15 August 2012 12:52:43 Junio C Hamano wrote:
Florian Achleitner [off-list ref] writes:
quoted
fast-import internally uses marks that refer to an object via its sha1.
Those marks are created during import to find previously created objects.
At exit the accumulated marks can be exported to a file and reloaded at
startup, so that the previous marks are available.
Add command line options to the fast-import command line to enable this.
The mark files are stored in info/fast-import/marks/<remote-name>.

Signed-off-by: Florian Achleitner <redacted>
---

 transport-helper.c |    3 +++
 1 file changed, 3 insertions(+)
diff --git a/transport-helper.c b/transport-helper.c
index 7fb52d4..47db055 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -387,6 +387,9 @@ static int get_importer(struct transport *transport,
struct child_process *fasti> 
 	fastimport->in = helper->out;
 	argv_array_push(&argv, "fast-import");
 	argv_array_push(&argv, debug ? "--stats" : "--quiet");

+	argv_array_push(&argv, "--relative-marks");
+	argv_array_pushf(&argv, "--import-marks-if-exists=marks/%s",
transport->remote->name); +	argv_array_pushf(&argv,
"--export-marks=marks/%s", transport->remote->name);
Is this something we want to do unconditionally?
Good question. It doesn't hurt, but it maybe . We could add another capability 
for remote-helpers, that tells us if it needs masks. What do you think?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help