Re: File versioning based on shallow Git repositories?

2018-04-12 Thread Rafael Ascensao
Would initiating a repo with a empty root commit, tag it with 'base' then

use $ git rebase --onto base master@{30 days ago} master;

be viable?

The --orphan & tag is perhaps more robust, since it's "harder" to move
tags around.

--
Rafael Ascensão


Re: How to undo previously set configuration?

2018-04-06 Thread Rafael Ascensao
On Fri, Apr 6, 2018 at 4:55 PM, Olaf Hering  wrote:
>
> This does not work. Initially I copied the global config into the repo and 
> set all unwanted values to , like 'smtpuser='. Perhaps the config 
> parser recognized that fact, but the consumer does not?
>

Today someone asked on #git for a way to disable diff.external for a
single command.
Without thinking much I suggested $git -c diff.external= diff; which fails with:
`fatal: cannot run : No such file or directory`

In this particular case there was `--no-ext-diff` to get around this
and the case was promptly resolved.
Just another another example where setting configuration values to
"empty" doesn't translate to "disable this option".


git complains packed-refs is not a directory when used with GIT_DIR and GIT_WORK_TREE envvars.

2018-03-26 Thread Rafael Ascensao
One of the tools that manages PKGBUILDS for Arch Linux stores PKGBUILD
git repos inside a cache directory for reuse.

One of the repos is triggering some unexpected behaviour that can be
reproduced in the CLI with:

  $ GIT_DIR=spotify/.git GIT_WORK_TREE=spotify git reset HEAD
  fatal: couldn't read spotify/.git/packed-refs: Not a directory

Moving up one directory works as expected.
  $ cd ..
  $ GIT_DIR=sync/spotify/.git GIT_WORK_TREE=sync/spotify git reset HEAD

Using -C seems to work fine too.
  $ git -C spotify reset HEAD

$ GIT_TRACE_SETUP=2 GIT_TRACE=2 GIT_DIR="spotify/.git"
GIT_WORK_TREE="spotify" git reset HEAD
22:10:53.020525 trace.c:315 setup: git_dir: spotify/.git
22:10:53.020605 trace.c:316 setup: git_common_dir: spotify/.git
22:10:53.020616 trace.c:317 setup: worktree:
/home/rafasc/.cache/aurutils/sync/spotify
22:10:53.020625 trace.c:318 setup: cwd:
/home/rafasc/.cache/aurutils/sync
22:10:53.020635 trace.c:319 setup: prefix: (null)
22:10:53.020644 git.c:344   trace: built-in: git 'reset' 'HEAD'
fatal: couldn't read spotify/.git/packed-refs: Not a directory

The issue seems to bisect to f57f37e2e1bf11ab4cdfd221ad47e961ba9353a0
I can't pinpoint why this particular repo is behaving differently.

Cumprimentos,
Rafael Ascensão


Re: [PATCH/RFC] git-post: the opposite of git-cherry-pick

2017-10-16 Thread Rafael Ascensao
> This is worth discussing, though not my preference. The picture to "pick
> cherries" has become quite common, and now that we use it for the name of
> the command, "cherry-pick", the direction of flow is quite obvious and
> strongly implied: from somewhere else to me (and not to somebody else).

What if we borrow '--onto' from rebase and make it cherry-pick --onto
?

This would keep the "pick cherries" analogy, but add the "they're not
for me" intention.
It also carries a bit of the "transplant" meaning of rebase.

-Rafael Ascensão