fast-export: do not export negative refs

When calling `git fast-export master..next` we want to export
refs/heads/next, but not refs/heads/master.

Currently this is not a problem, because negative refs' commits
are never shown. In the next commit this will be changed in order
to make sure that 'master..master' does export master. I.e. even
refs whose commits are not shown are exported.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
This commit is contained in:
Johannes Schindelin
2011-07-23 15:40:23 +02:00
committed by Pat Thoyts
parent 3bd1ca55e6
commit 1b8e6a56d4

View File

@@ -486,7 +486,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
struct commit *commit = commit;
char *full_name;
if (dwim_ref(e->name, strlen(e->name), sha1, &full_name) != 1)
if ((e->flags & UNINTERESTING) || dwim_ref(e->name, strlen(e->name), sha1, &full_name) != 1)
continue;
switch (e->item->type) {