Skip to content

Commit

Permalink
new setting for verbose git debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Lukasczyk committed Oct 9, 2024
1 parent 4d2da71 commit 52009cb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
12 changes: 4 additions & 8 deletions packages/main/src/GitService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,10 @@ export const GitService = {
o.detached=false;
o.shell = true;

// verbose
// o.env['GIT_TRACE'] = 1;
// o.env['GIT_TRACE_PACKET'] = 1;
// o.env['GIT_TRACE_PERFORMANCE'] = 1;
// o.env['GIT_TRACE_SETUP'] = 1;
// o.env['GIT_CURL_VERBOSE'] = 1;
// o.env['GIT_TRANSFER_TRACE'] = 1;
// o.stdio = 'inherit';
if(o.debug){
o.env['GIT_TRACE'] = 1;
o.env['GIT_CURL_VERBOSE'] = 1;
}

o.cwd = (o.cwd || '').split('/').join(PATH.sep);

Expand Down
3 changes: 1 addition & 2 deletions packages/renderer/src/AppProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const AppProperties: {
force_lfs_update: 0,

config: {
gitDebug: false,
toolbarMinimized: false,
showHelp: false,
showTooltips: false,
Expand Down Expand Up @@ -72,7 +73,6 @@ const get_datahubs = async ()=>{
active: true,
starts_at: new Date().toISOString()
})
console.log(new Date().toISOString())
AppProperties.datahub_hosts_msgs[host] = temp;
} else {
let contains_critical = false;
Expand All @@ -89,7 +89,6 @@ const get_datahubs = async ()=>{
const init = async ()=>{
await AppProperties.read_config();
watch(AppProperties.config, ()=>{
console.log('xxx')
window.ipc.invoke('LocalFileSystemService.writeConfig', JSON.stringify(AppProperties.config));
});
await get_datahubs();
Expand Down
9 changes: 6 additions & 3 deletions packages/renderer/src/views/GitSyncView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ const push = async()=>{
response = await window.ipc.invoke('GitService.run', {
args: args,
cwd: ArcControlService.props.arc_root
cwd: ArcControlService.props.arc_root,
debug: AppProperties.config.gitDebug
});
// unpatch
Expand Down Expand Up @@ -373,7 +374,8 @@ const pull = async()=>{
cwd: ArcControlService.props.arc_root,
env: {
GIT_LFS_SKIP_SMUDGE: iProps.use_lfs?0:1
}
},
debug: AppProperties.config.gitDebug
});
dialogProps.needs_merge = !response[0] && response[1].includes('You have divergent branches and need to specify how to reconcile them.');
if(dialogProps.needs_merge){
Expand All @@ -384,7 +386,8 @@ const pull = async()=>{
if(iProps.use_lfs){
response = await window.ipc.invoke('GitService.run', {
args: [`lfs`,`pull`,iProps.remote,branches.current],
cwd: ArcControlService.props.arc_root
cwd: ArcControlService.props.arc_root,
debug: AppProperties.config.gitDebug
});
}
Expand Down
10 changes: 10 additions & 0 deletions packages/renderer/src/views/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ const resetARCitect = async ()=>{
default-opened
>
<q-list dense>
<q-item tag="label" v-ripple="{color:'grey'}">
<q-item-section avatar>
<q-checkbox v-model="AppProperties.config.gitDebug" color='secondary'/>
</q-item-section>
<q-item-section>
<q-item-label>Git Debugging</q-item-label>
<q-item-label caption>Enables verbose git messages during push and pull requests</q-item-label>
</q-item-section>
</q-item>

<q-item tag="label" v-ripple="{color:'grey'}">
<q-item-section avatar>
<q-checkbox v-model="AppProperties.config.showTooltips" color='secondary'/>
Expand Down
1 change: 1 addition & 0 deletions resources/ARCitect.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"gitDebug": false,
"toolbarMinimized": false,
"showHelp": false,
"showTooltips": false,
Expand Down

0 comments on commit 52009cb

Please sign in to comment.