-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Dump: add output format tar and output to stdout #10376
Conversation
cmd/dump.go
Outdated
fileName := ctx.String("file") | ||
if fileName == "-" { | ||
file = os.Stdout | ||
log.DelLogger("console") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't found a better way to setup the console logger to log to stderr.
So I just deleted the logger as logs may break the file written to stdout.
@PhilippHomann CI failed. |
Okay, I see. |
Codecov Report
@@ Coverage Diff @@
## master #10376 +/- ##
=========================================
Coverage ? 43.69%
=========================================
Files ? 586
Lines ? 81879
Branches ? 0
=========================================
Hits ? 35775
Misses ? 41661
Partials ? 4443
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit with CreateFile - i.e. create the file with the mode 0600 initially rather than restrict later.
Otherwise this seems OK.
(The number of dependencies did concern me but these seem reasonable.)
please resolve conflicts |
@lafriks Did some refactoring and pushed, but seems like drone crashed. Could you please trigger a rebuild? |
@PhilippHomann you need go v1.14 now pleace execute |
@lafriks Got it finally. |
Signed-off-by: Philipp Homann <[email protected]>
…ever "file" Signed-off-by: Philipp Homann <[email protected]>
…hey are below AppDataPath Signed-off-by: Philipp Homann <[email protected]>
Signed-off-by: Philipp Homann <[email protected]>
…AppDataPath (fixes #10365) Signed-off-by: Philipp Homann <[email protected]>
Signed-off-by: Philipp Homann <[email protected]>
Signed-off-by: Philipp Homann <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #10376 +/- ##
==========================================
- Coverage 43.95% 43.78% -0.18%
==========================================
Files 614 607 -7
Lines 87428 87031 -397
==========================================
- Hits 38431 38104 -327
+ Misses 44259 44220 -39
+ Partials 4738 4707 -31
Continue to review full report at Codecov.
|
pleace resolve conflict |
@6543 Done but don't know what happened in drone.. |
@6543 Build worked now. Could you please give your approval? |
I first have to look through the code |
* Dump: Use mholt/archive/v3 to support tar including many compressions Signed-off-by: Philipp Homann <[email protected]> * Dump: Allow dump output to stdout Signed-off-by: Philipp Homann <[email protected]> * Dump: Fixed bug present since go-gitea#6677 where SessionConfig.Provider is never "file" Signed-off-by: Philipp Homann <[email protected]> * Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath Signed-off-by: Philipp Homann <[email protected]> * Dump: also dump LFS (fixes go-gitea#10058) Signed-off-by: Philipp Homann <[email protected]> * Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes go-gitea#10365) Signed-off-by: Philipp Homann <[email protected]> * Use log.Info instead of fmt.Fprintf Signed-off-by: Philipp Homann <[email protected]> * import ordering * make fmt Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Matti R <[email protected]>
To read dumps output from
docker exec
I needed support for tar and write to stdout.