[PATCH 4/5] fast-export: do not export negative refs
- From
Sverre Rabbelier <srabbelier@gmail.com>
- Date
- Jul 24, 2011, 14:21 UTC
- Message-ID
- <1311517282-24831-5-git-send-email-srabbelier@gmail.com>
- In-Reply-To
- <1311517282-24831-1-git-send-email-srabbelier@gmail.com>
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
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> ---
We noticed this while trying to come up with a test case for the bug we found.
builtin/fast-export.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 92743c8..628eab0 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -467,7 +467,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) {
-- 1.7.6.385.g91185.dirty