Skip to content

Commit

Permalink
contrib/git-credential-gnome-keyring.c: set Gnome application name
Browse files Browse the repository at this point in the history
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 <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Oct 16, 2013
1 parent 73bbc07 commit ff55c47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/credential/gnome-keyring/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ CFLAGS = -g -O2 -Wall
-include ../../../config.mak.autogen
-include ../../../config.mak

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

SRCS:=$(MAIN).c
OBJS:=$(SRCS:.c=.o)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#include <glib.h>
#include <gnome-keyring.h>

/*
Expand Down Expand Up @@ -399,6 +400,8 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}

g_set_application_name("Git Credential Helper");

/* lookup operation callback */
while (try_op->name && strcmp(argv[1], try_op->name))
try_op++;
Expand Down

0 comments on commit ff55c47

Please sign in to comment.