Re: [PATCH v5 15/16] remote-svn: add marks-file regeneration

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

Re: [PATCH v5 15/16] remote-svn: add marks-file regeneration

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

Junio C Hamano [off-list ref] writes:
I think you meant something like:

	init_notes(NULL, notes_ref, NULL, 0);
        marksfile = fopen(marksfilename, "r");
        if (!marksfile) {
        	regenerate_marks(marksfilename);
                marksfile = fopen(marksfilename, "r");
                if (!marksfile)
	                die("cannot read marks file!");
	} else {
        	...

Also there is another call to regenerate_marks() without any
argument.  Has this even been compile-tested?
I've made regenerate_marks() to take (void) parameter list, as
marksfilename is a file scope static and visible to everybody, and
applied something like the above and queued the result in 'pu'.

Re: [PATCH v5 15/16] remote-svn: add marks-file regeneration

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

On Monday 20 August 2012 16:20:27 Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
I think you meant something like:
	init_notes(NULL, notes_ref, NULL, 0);
	
        marksfile = fopen(marksfilename, "r");
        if (!marksfile) {
        
        	regenerate_marks(marksfilename);
        	
                marksfile = fopen(marksfilename, "r");
                if (!marksfile)
                
	                die("cannot read marks file!");
	
	} else {
	
        	...

Also there is another call to regenerate_marks() without any
argument.  Has this even been compile-tested?
Yes it compiled and it works (is tested by t9020), but the compiler didn't 
complain because I left out void, so every argument was ok. I need to get used 
to that C-feature.
I've made regenerate_marks() to take (void) parameter list, as
marksfilename is a file scope static and visible to everybody, and
applied something like the above and queued the result in 'pu'.
That's exactly how I meant it. Thanks for your fixups!

Re: [PATCH v5 15/16] remote-svn: add marks-file regeneration

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

On Monday 20 August 2012 16:20:27 Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
I think you meant something like:

      init_notes(NULL, notes_ref, NULL, 0);

        marksfile = fopen(marksfilename, "r");
        if (!marksfile) {
              regenerate_marks(marksfilename);
                marksfile = fopen(marksfilename, "r");
Btw, this is FILE* is nowhere closed in your fixuped version in fa/remote-svn.
quoted
                if (!marksfile)

                      die("cannot read marks file!");
      } else {

              ...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help