Revision 19926351bcfaf8d524cbc350c09707018e782609 authored by Jiang Xin on 16 June 2018, 14:05:21 UTC, committed by Jiang Xin on 16 June 2018, 14:05:21 UTC
* 'master' of git://github.com/git-l10n/git-po: l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round2 l10n: bg.po: Updated Bulgarian translation (3608t) l10n: es.po: Spanish update for v2.18.0 round 2 l10n: git.pot: v2.18.0 round 2 (144 new, 6 removed) l10n: fr.po v2.18 round 1 l10n: vi(3470t): Updated Vietnamese translation for v2.18.0 l10n: es.po: Spanish update for v2.18.0 round 1 l10n: git.pot: v2.18.0 round 1 (108 new, 14 removed) l10n: TEAMS: remove inactive de team members l10n: de.po: fix typos l10n: Update Catalan translation
checkout.c
#include "cache.h"
#include "remote.h"
#include "refspec.h"
#include "checkout.h"
struct tracking_name_data {
/* const */ char *src_ref;
char *dst_ref;
struct object_id *dst_oid;
int unique;
};
static int check_tracking_name(struct remote *remote, void *cb_data)
{
struct tracking_name_data *cb = cb_data;
struct refspec_item query;
memset(&query, 0, sizeof(struct refspec_item));
query.src = cb->src_ref;
if (remote_find_tracking(remote, &query) ||
get_oid(query.dst, cb->dst_oid)) {
free(query.dst);
return 0;
}
if (cb->dst_ref) {
free(query.dst);
cb->unique = 0;
return 0;
}
cb->dst_ref = query.dst;
return 0;
}
const char *unique_tracking_name(const char *name, struct object_id *oid)
{
struct tracking_name_data cb_data = { NULL, NULL, NULL, 1 };
cb_data.src_ref = xstrfmt("refs/heads/%s", name);
cb_data.dst_oid = oid;
for_each_remote(check_tracking_name, &cb_data);
free(cb_data.src_ref);
if (cb_data.unique)
return cb_data.dst_ref;
free(cb_data.dst_ref);
return NULL;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...