Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5a6eee

Browse files
committed
WIP: debugging issue with renaming/deleting config keys
M-x compile := cd ~/git/libgit2/build && cmake --build . && ./libgit2_tests -sconfig::rename::can_renamelog: new call to git_config_entries_get_uniquelog: needle: core.filemodelog: haystack:log: remote.test_with_pushurl.url => git://github.com/libgit2/fetchlibgit2log: remote.test.fetch => +refs/heads/*:refs/remotes/test/*log: branch.master.remote => testlog: branch.cannot-fetch.merge => refs/heads/cannot-fetchlog: remote.test_with_pushurl.fetch => +refs/heads/*:refs/remotes/test_with_pushurl/*log: core.filemode => truelog: branch.mergeless.merge =>log: branch.mergeless.remote => testlog: remote.joshaber.url => git://github.com/libgit2/libgit2log: remote.empty-remote-url.url =>log: branch.mergeandremoteless.merge =>log: remote.no-remote-url.fetch =>log: remote.empty-remote-pushurl.pushurl =>log: core.bare => truelog: core.logallrefupdates => truelog: branch.track-local.merge => refs/heads/masterlog: core.repositoryformatversion => 0log: branch.remoteless.remote =>log: branch.mergeandremoteless.remote =>log: remote.test_with_pushurl.pushurl => git://github.com/libgit2/pushlibgit2log: branch.remoteless.merge => refs/heads/masterlog: remote.empty-remote-url.pushurl =>log: branch.master.merge => refs/heads/masterlog: branch.cannot-fetch.remote => joshaberlog: branch.track-local.remote => .log: remote.test.url => git://github.com/libgit2/libgit2log: endlog: found core.filemode=truelog: new call to git_config_entries_get_uniquelog: needle: core.symlinkslog: haystack:log: remote.test_with_pushurl.url => git://github.com/libgit2/fetchlibgit2log: remote.test.fetch => +refs/heads/*:refs/remotes/test/*log: branch.master.remote => testlog: branch.cannot-fetch.merge => refs/heads/cannot-fetchlog: remote.test_with_pushurl.fetch => +refs/heads/*:refs/remotes/test_with_pushurl/*log: core.filemode => truelog: branch.mergeless.merge =>log: branch.mergeless.remote => testlog: remote.joshaber.url => git://github.com/libgit2/libgit2log: remote.empty-remote-url.url =>log: branch.mergeandremoteless.merge =>log: remote.no-remote-url.fetch =>log: remote.empty-remote-pushurl.pushurl =>log: core.bare => truelog: core.logallrefupdates => truelog: branch.track-local.merge => refs/heads/masterlog: core.repositoryformatversion => 0log: branch.remoteless.remote =>log: branch.mergeandremoteless.remote =>log: remote.test_with_pushurl.pushurl => git://github.com/libgit2/pushlibgit2log: branch.remoteless.merge => refs/heads/masterlog: remote.empty-remote-url.pushurl =>log: branch.master.merge => refs/heads/masterlog: branch.cannot-fetch.remote => joshaberlog: branch.track-local.remote => .log: remote.test.url => git://github.com/libgit2/libgit2log: endlog: 'core.symlinks' NOT FOUNDlog: new call to git_config_entries_get_uniquelog: needle: core.ignorecaselog: haystack:log: remote.test_with_pushurl.url => git://github.com/libgit2/fetchlibgit2log: remote.test.fetch => +refs/heads/*:refs/remotes/test/*log: branch.master.remote => testlog: branch.cannot-fetch.merge => refs/heads/cannot-fetchlog: remote.test_with_pushurl.fetch => +refs/heads/*:refs/remotes/test_with_pushurl/*log: core.filemode => truelog: branch.mergeless.merge =>log: branch.mergeless.remote => testlog: remote.joshaber.url => git://github.com/libgit2/libgit2log: remote.empty-remote-url.url =>log: branch.mergeandremoteless.merge =>log: remote.no-remote-url.fetch =>log: remote.empty-remote-pushurl.pushurl =>log: core.bare => truelog: core.logallrefupdates => truelog: branch.track-local.merge => refs/heads/masterlog: core.repositoryformatversion => 0log: branch.remoteless.remote =>log: branch.mergeandremoteless.remote =>log: remote.test_with_pushurl.pushurl => git://github.com/libgit2/pushlibgit2log: branch.remoteless.merge => refs/heads/masterlog: remote.empty-remote-url.pushurl =>log: branch.master.merge => refs/heads/masterlog: branch.cannot-fetch.remote => joshaberlog: branch.track-local.remote => .log: remote.test.url => git://github.com/libgit2/libgit2log: endlog: 'core.ignorecase' NOT FOUNDlog: new call to git_config_entries_get_uniquelog: needle: branch.local-track.remotelog: haystack:log: endlog: 'branch.local-track.remote' NOT FOUNDlog: new call to git_config_entries_get_uniquelog: needle: branch.track-local.remotelog: haystack:log: branch.local-track.remote => .log: endlog: 'branch.track-local.remote' NOT FOUNDF 1) Failure:config::rename::can_rename [/home/sallred/git/libgit2/tests/libgit2/config/rename.c:34] Function call failed: (git_config_rename_section( g_repo, "branch.track-local", "branch.local-track")) error -3 - could not find key 'branch.track-local.remote' to delete
1 parent2f05ba7 commita5a6eee

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

‎src/libgit2/config_entries.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,19 +179,36 @@ int git_config_entries_get_unique(git_config_entry **out, git_config_entries *en
179179
{
180180
config_entry_map_head*entry;
181181

182-
if ((entry=git_strmap_get(entries->map,key))==NULL)
183-
returnGIT_ENOTFOUND;
182+
printf("\nlog: new call to git_config_entries_get_unique\n");
183+
printf("log: needle: %s\n",key);
184+
printf("log: haystack:\n");
185+
186+
char*key1;config_entry_map_head*value;
187+
git_strmap_foreach(entries->map,key1,value, {
188+
printf("log: %s => %s\n",key1,value->entry->value);
189+
});
190+
191+
printf("log: end\n");
192+
193+
if ((entry=git_strmap_get(entries->map,key))==NULL) {
194+
printf("log: '%s' NOT FOUND\n",key);
195+
returnGIT_ENOTFOUND;
196+
}
184197

185198
if (entry->multivar) {
199+
printf("log: '%s' NOT UNIQUE: MULTIVAR\n",key);
200+
186201
git_error_set(GIT_ERROR_CONFIG,"entry is not unique due to being a multivar");
187202
return-1;
188203
}
189204

190205
if (entry->entry->include_depth) {
206+
printf("log: '%s' NOT UNIQUE: INCLUDED\n",key);
191207
git_error_set(GIT_ERROR_CONFIG,"entry is not unique due to being included");
192208
return-1;
193209
}
194210

211+
printf("log: found %s=%s\n",entry->entry->name,entry->entry->value);
195212
*out=entry->entry;
196213

197214
return0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp