-
Notifications
You must be signed in to change notification settings - Fork 869
Closed
Labels
no-autocloseIssues/PRs to be ignored by stale botIssues/PRs to be ignored by stale bot
Milestone
Description
See here for fix: #253 (comment)
I need to commit symlinks that are intentionally pointed outside the repository.
For example:
# git diff X11/fontpath.d/liberation-sans-fonts
diff --git a/X11/fontpath.d/liberation-sans-fonts b/X11/fontpath.d/liberation-sans-fonts
index 0e445f8..0a9a11f 120000
--- a/X11/fontpath.d/liberation-sans-fonts
+++ b/X11/fontpath.d/liberation-sans-fonts
@@ -1 +1 @@
-/../usr/share/fonts/liberation-sans
\ No newline at end of file
+/usr/share/fonts/liberation-sans
\ No newline at end of file
# ls -l X11/fontpath.d/liberation-sans-fonts
lrwxrwxrwx. 1 root root 32 Apr 1 20:59 X11/fontpath.d/liberation-sans-fonts -> /usr/share/fonts/liberation-sans
git properly commits this as-is, but go-git mangles it to an absolute path in the commit - THUS even after a commit, the worktree is always dirty because the commit created by go-git does not contain the proper content that reflects the real 'contents'.
This leads to broken status in addition to an inaccurate/incorrect commit's file contents.
Metadata
Metadata
Assignees
Labels
no-autocloseIssues/PRs to be ignored by stale botIssues/PRs to be ignored by stale bot