Skip to content

Commit ff55c47

Browse files
drafnelgitster
authored andcommitted
contrib/git-credential-gnome-keyring.c: set Gnome application name
Since this is a Gnome application, let's set the application name to something reasonable. This will be displayed in Gnome dialog boxes e.g. the one that prompts for the user's keyring password. We add an include statement for glib.h and add the glib-2.0 cflags and libs to the compilation arguments, but both of these are really noops since glib is already a dependency of gnome-keyring. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73bbc07 commit ff55c47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

contrib/credential/gnome-keyring/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CFLAGS = -g -O2 -Wall
88
-include ../../../config.mak.autogen
99
-include ../../../config.mak
1010

11-
INCS:=$(shell pkg-config --cflags gnome-keyring-1)
12-
LIBS:=$(shell pkg-config --libs gnome-keyring-1)
11+
INCS:=$(shell pkg-config --cflags gnome-keyring-1 glib-2.0)
12+
LIBS:=$(shell pkg-config --libs gnome-keyring-1 glib-2.0)
1313

1414
SRCS:=$(MAIN).c
1515
OBJS:=$(SRCS:.c=.o)

contrib/credential/gnome-keyring/git-credential-gnome-keyring.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <stdarg.h>
2929
#include <stdlib.h>
3030
#include <errno.h>
31+
#include <glib.h>
3132
#include <gnome-keyring.h>
3233

3334
/*
@@ -399,6 +400,8 @@ int main(int argc, char *argv[])
399400
exit(EXIT_FAILURE);
400401
}
401402

403+
g_set_application_name("Git Credential Helper");
404+
402405
/* lookup operation callback */
403406
while (try_op->name && strcmp(argv[1], try_op->name))
404407
try_op++;

0 commit comments

Comments
 (0)