-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create 'feature.*' config area and some centralized config parsing #292
Changes from 3 commits
1a0b30b
6bf3584
651e2d5
ec0abff
082fc57
f30e25f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -964,6 +964,7 @@ LIB_OBJS += refspec.o | |
LIB_OBJS += ref-filter.o | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Johannes Schindelin wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Johannes Schindelin wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
|
||
LIB_OBJS += remote.o | ||
LIB_OBJS += replace-object.o | ||
LIB_OBJS += repo-settings.o | ||
LIB_OBJS += repository.o | ||
LIB_OBJS += rerere.o | ||
LIB_OBJS += resolve-undo.o | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "cache.h" | ||
#include "config.h" | ||
#include "repository.h" | ||
|
||
#define UPDATE_DEFAULT_BOOL(s,v) do { if (s == -1) { s = v; } } while(0) | ||
|
||
void prepare_repo_settings(struct repository *r) | ||
{ | ||
int value; | ||
|
||
if (r->settings.initialized) | ||
return; | ||
|
||
/* Defaults */ | ||
memset(&r->settings, -1, sizeof(r->settings)); | ||
|
||
if (!repo_config_get_bool(r, "core.commitgraph", &value)) | ||
r->settings.core_commit_graph = value; | ||
if (!repo_config_get_bool(r, "gc.writecommitgraph", &value)) | ||
r->settings.gc_write_commit_graph = value; | ||
UPDATE_DEFAULT_BOOL(r->settings.core_commit_graph, 1); | ||
UPDATE_DEFAULT_BOOL(r->settings.gc_write_commit_graph, 1); | ||
|
||
if (!repo_config_get_bool(r, "index.version", &value)) | ||
r->settings.index_version = value; | ||
|
||
if (!repo_config_get_bool(r, "pack.usesparse", &value)) | ||
r->settings.pack_use_sparse = value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, "brian m. carlson" wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Phillip Wood wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Jeff King wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Phillip Wood wrote (reply to this):