[gnome-builder] vcs: register GIO backup styled ~ suffix as ignored
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vcs: register GIO backup styled ~ suffix as ignored
- Date: Wed, 31 Jan 2018 10:30:07 +0000 (UTC)
commit 49841965fc36681581dee44aabfa63e8d1f5031f
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 31 02:27:37 2018 -0800
vcs: register GIO backup styled ~ suffix as ignored
If we have a file that ends in ~, that is almost certainly a
backup file we've created with GIO and it should be ignored.
src/libide/vcs/ide-vcs.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/libide/vcs/ide-vcs.c b/src/libide/vcs/ide-vcs.c
index 69149dddc..f750512be 100644
--- a/src/libide/vcs/ide-vcs.c
+++ b/src/libide/vcs/ide-vcs.c
@@ -170,6 +170,10 @@ ide_vcs_is_ignored (IdeVcs *self,
len = strlen (name);
+ /* Ignore builtin backup files by GIO */
+ if (name[len - 1] == '~')
+ return TRUE;
+
reversed = g_utf8_strreverse (name, len);
G_LOCK (ignored);
@@ -244,6 +248,10 @@ ide_vcs_path_is_ignored (IdeVcs *self,
len = strlen (name);
+ /* Ignore builtin backup files by GIO */
+ if (name[len - 1] == '~')
+ return TRUE;
+
reversed = g_utf8_strreverse (name, len);
G_LOCK (ignored);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]