Re: [PATCH] Add *.rej to .gitignore

From: David Miller
Date: Tue Feb 17 2009 - 20:05:31 EST


From: Ingo Molnar <mingo@xxxxxxx>
Date: Wed, 18 Feb 2009 01:49:19 +0100

> I'd argue with calling it 'naive', i'd call it 'dangerous'.
>
> Anyway, i definitely dont want to prevent others from having a
> defense against mistakes (even if those mistakes are at least
> partly self-inflicted).
>
> My only beef is that i think i have a good workflow, still i
> have no efficient automated defense against .rej files getting
> into the tree. I have to use 'git commit -n' too frequently, and
> that overrides the pre-commit hook.
>
> I.e. i should start using the workflow i consider more dangerous
> - and i should start removing .rej files while they are clearly
> useful even after the commit.
>
> Isnt that backwards?

I think by and large most people only commit with explicit additions
into the index file either by specifying files explicitly on the
"git commit" command line or explicitly calling "git add".

You see a problem when you're telling git "look at my tree and figure
out what to commit." Putting the kitchen sink into .gitignore and
relying upon that is not a tenable solution.

Instead of hoping git does exactly what you want it to do, tell
it explicitly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/