Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Ethan Sommer
On Mon, May 18, 2020 at 3:36 PM Laslo Hunhold wrote: > > On Mon, 18 May 2020 12:18:33 -0700 > Michael Forney wrote: > > Dear Michael, > > > Whether you like it or not, it's the most common usage of tar by far, > > and as far as I know, the only one that was ever standardized. You are > > not forc

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Quentin Rameau
> > At least, I would print a warning if the old style syntax is seen so > > people start fixing their scripts. > > On what basis are scripts written to the SUSv2 specification broken? On the basis that tar was already specified as deprecated in SUSv1 26 years ago, and that sbase follows last P

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Laslo Hunhold
On Mon, 18 May 2020 12:18:33 -0700 Michael Forney wrote: Dear Michael, > Whether you like it or not, it's the most common usage of tar by far, > and as far as I know, the only one that was ever standardized. You are > not forced to use this syntax, the usage following the Utility Syntax > Guidel

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Michael Forney
On 2020-05-18, Laslo Hunhold wrote: > I have objections for this patch. I don't like the old style and it's > horribly annoying with tools like unrar and 7z as well. I don't know > why the compression tools all ignore years of established command line > syntax, but I think we shouldn't chime in to

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Ethan Sommer
On Mon, May 18, 2020 at 1:07 PM Laslo Hunhold wrote: > On Mon, 18 May 2020 22:39:00 +0700 > Đoàn Trần Công Danh wrote: > > Dear Đoàn, > > > Sorry, but isn't no-dash is the one specified by POSIX: > > https://pubs.opengroup.org/onlinepubs/7908799/xcu/tar.html > > Please excuse my ignorance, I cou

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Alex Pilon
On Mon, May 18, 2020 at 06:59:36PM +0200, Laslo Hunhold wrote: > POSIX "replaced" tar with pax(1)[0], I'm all for promoting pax (or cpio) over tar, whether with find or what was that long discussion about a replacement for it from a while ago. Though on output it seems a bit primitive to support o

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Quentin Rameau
> Every other tar implementation I've looked at supports either both > dash-less argument, and arguments with dashes, or only dash-less > argument. sbase tar is the only tar that only supports arguments with a > dash, so to use tar as portably as possible, one has to not have a dash > with the argu

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Ethan Sommer
On Mon, May 18, 2020 at 10:44 AM Quentin Rameau wrote: > > Hi all, > > > Dear Michael, > > > > > Thanks for the patch, Ethan. > > > > > > This patch looks fine to me, but seeing as we used to support this > > > usage before it was reverted in [0], I'd like to see if anyone else > > > has comments.

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Laslo Hunhold
On Mon, 18 May 2020 22:39:00 +0700 Đoàn Trần Công Danh wrote: Dear Đoàn, > Sorry, but isn't no-dash is the one specified by POSIX: > https://pubs.opengroup.org/onlinepubs/7908799/xcu/tar.html > Please excuse my ignorance, I couldn't find newer specification. no, this is no ignorance. POSIX "rep

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Đoàn Trần Công Danh
On 2020-05-18 16:44:24+0200, Quentin Rameau wrote: > Hi all, > > > Dear Michael, > > > > > Thanks for the patch, Ethan. > > > > > > This patch looks fine to me, but seeing as we used to support this > > > usage before it was reverted in [0], I'd like to see if anyone else > > > has comments. Th

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Quentin Rameau
Hi all, > Dear Michael, > > > Thanks for the patch, Ethan. > > > > This patch looks fine to me, but seeing as we used to support this > > usage before it was reverted in [0], I'd like to see if anyone else > > has comments. The approach you used avoids the code duplication that > > may have been

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Laslo Hunhold
On Mon, 18 May 2020 02:08:12 -0700 Michael Forney wrote: Dear Michael, > Thanks for the patch, Ethan. > > This patch looks fine to me, but seeing as we used to support this > usage before it was reverted in [0], I'd like to see if anyone else > has comments. The approach you used avoids the cod

Re: [hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-18 Thread Michael Forney
On 2020-05-15, Ethan Sommer wrote: > this allows tar to be called in the common form "tar " instead of only > allowing "tar -" Thanks for the patch, Ethan. This patch looks fine to me, but seeing as we used to support this usage before it was reverted in [0], I'd like to see if anyone else has c

[hackers] [PATCH] tar: if first argument doesn't have a leading dash, prepend one

2020-05-15 Thread Ethan Sommer
this allows tar to be called in the common form "tar " instead of only allowing "tar -" --- tar.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tar.c b/tar.c index 603e544..759402e 100644 --- a/tar.c +++ b/tar.c @@ -520,6 +520,12 @@ main(int argc, char *argv[]) char *file = NUL