Skip to content
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

Add support to develop Git in Visual Studio Code #2

Closed
wants to merge 9 commits into from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
/config.mak.autogen
/config.mak.append
/configure
/.vscode/
/tags
/TAGS
/cscope*
Expand Down
24 changes: 13 additions & 11 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -1425,18 +1425,20 @@ extern void *read_object_with_reference(const struct object_id *oid,
extern struct object *peel_to_type(const char *name, int namelen,
struct object *o, enum object_type);

enum date_mode_type {
DATE_NORMAL = 0,
DATE_RELATIVE,
DATE_SHORT,
DATE_ISO8601,
DATE_ISO8601_STRICT,
DATE_RFC2822,
DATE_STRFTIME,
DATE_RAW,
DATE_UNIX
};

struct date_mode {
enum date_mode_type {
DATE_NORMAL = 0,
DATE_RELATIVE,
DATE_SHORT,
DATE_ISO8601,
DATE_ISO8601_STRICT,
DATE_RFC2822,
DATE_STRFTIME,
DATE_RAW,
DATE_UNIX
} type;
enum date_mode_type type;
const char *strftime_fmt;
int local;
};
Expand Down
2 changes: 1 addition & 1 deletion config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
compat/win32/dirent.o
BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
BASIC_CFLAGS += -DWIN32 -DPROTECT_NTFS_DEFAULT=1
EXTLIBS += -lws2_32
GITLIBS += git.res
PTHREAD_LIBS =
Expand Down
1 change: 1 addition & 0 deletions contrib/vscode/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
init.sh whitespace=-indent-with-non-tab
14 changes: 14 additions & 0 deletions contrib/vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Configuration for VS Code
=========================

[VS Code](https://code.visualstudio.com/) is a lightweight but powerful source
code editor which runs on your desktop and is available for
[Windows](https://code.visualstudio.com/docs/setup/windows),
[macOS](https://code.visualstudio.com/docs/setup/mac) and
[Linux](https://code.visualstudio.com/docs/setup/linux). Among other languages,
it has [support for C/C++ via an extension](https://github.com/Microsoft/vscode-cpptools).

To start developing Git with VS Code, simply run the Unix shell script called
`init.sh` in this directory, which creates the configuration files in
`.vscode/` that VS Code consumes. `init.sh` needs access to `make` and `gcc`,
so run the script in a Git SDK shell if you are using Windows.