Re: What's cooking in git.git (Nov 2013, #01; Fri, 1)

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

Re: What's cooking in git.git (Nov 2013, #01; Fri, 1)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:10

Ramsay Jones [off-list ref] writes:
On 01/11/13 22:52, Junio C Hamano wrote:
quoted
Here are the topics that have been cooking.  Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
[ ... ]
quoted

* fc/transport-helper-fixes (2013-11-01) 11 commits
 - transport-helper: demote lack of "force" option to a warning
 - transport-helper: add support to delete branches
 - fast-export: add support to delete refs
 - fast-import: add support to delete refs
 - transport-helper: add support for old:new refspec
 - fast-export: add new --refspec option
 - fast-export: improve argument parsing
 - transport-helper: check for 'forced update' message
 - transport-helper: add 'force' to 'export' helpers
 - transport-helper: don't update refs in dry-run
 - transport-helper: mismerge fix

 Updates transport-helper, fast-import and fast-export to allow the
 ref mapping and ref deletion in a way similar to the natively
 supported transports.

 Will merge to 'next'.
Commit ad24a30ef ("fast-export: add new --refspec option", 31-10-2013)
causes sparse to complain:

      SP builtin/fast-export.c
  builtin/fast-export.c:739:55: warning: Variable length array is used.

Do we want to use this C99 feature?
Good eyes, and no---this needs to be fixed before going forward.

Thanks for spotting.

Re: What's cooking in git.git (Nov 2013, #01; Fri, 1)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:13

Junio C Hamano [off-list ref] writes:
quoted
Commit ad24a30ef ("fast-export: add new --refspec option", 31-10-2013)
causes sparse to complain:

      SP builtin/fast-export.c
  builtin/fast-export.c:739:55: warning: Variable length array is used.

Do we want to use this C99 feature?
Good eyes, and no---this needs to be fixed before going forward.

Thanks for spotting.
I'm tempted to squash this in to the problematic commit, if nobody
comes up with a better fix soonish, before merging the series to
'next'.

 builtin/fast-export.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 8ed41b4..7d02f63 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -736,9 +736,10 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
 		usage_with_options (fast_export_usage, options);
 
 	if (refspecs_list.nr) {
-		const char *refspecs_str[refspecs_list.nr];
+		const char **refspecs_str;
 		int i;
 
+		refspecs_str = xmalloc(sizeof(const char *) * refspecs_list.nr);
 		for (i = 0; i < refspecs_list.nr; i++)
 			refspecs_str[i] = refspecs_list.items[i].string;
 
@@ -746,6 +747,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
 		refspecs = parse_fetch_refspec(refspecs_nr, refspecs_str);
 
 		string_list_clear(&refspecs_list, 1);
+		free(refspecs_str);
 	}
 
 	if (use_done_feature)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help